in reply to Regular Expressions

One minor issue. You have:

$filepath="c:\\reports";
However, the double-quotes will convert the '\\' to a '\', since '\' is a meta-character. You might try using single quotes instead:

$filepath='c:\\reports';
Hope this helps.

--
tbone1, YAPS (Yet Another Perl Schlub)
And remember, if he succeeds, so what.
- Chick McGee

Replies are listed 'Best First'.
Re^2: Regular Expressions
by blazar (Canon) on Nov 09, 2005 at 14:51 UTC
    However, the double-quotes will convert the '\\' to a '\', since '\' is a meta-character. You might try using single quotes instead:
    1. I think that's exactly what that he wants. But then he should just use forward slashes, since they work just the same even under Windows,
    2. '\' is a meta charachter in single quoted strings too:
    3. $ cat foo print '\\'; $ perl -l foo \