Code Comments
Programming Forum and web based access to our favorite programming groups.> (my $orders_dir)
> File 121212.TXT ...contains
> 12345.html <spaces> CR
> 12346.html <spaces> CR
>=20
> Here is the piece I'm having trouble w/
>=20
> foreach my $html (@htmls) {
> if ($html =3D~ /^($_)\s*/) {
> my $msg =3D MIME::Lite->new (
Where does it fail?=20
if ($html =3D~ /^($_)\s*/)=20
$_ has no value since you forloop is assigning to $html so I am not
sure what you are trying to match with ($_)
looking at your sample data this would work
if ( $html =3D~ /^(\d+\.html)/ ){
my $filename =3D $1;
} =20
filename would contain your files.
^ Beg line
\d+ any number of digits (0-9)
\. followed by a period
html followed by html
the () capture the match into $1.
HTH,
Paul
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.