in reply to perl + CGI's
Never ever use $1 or $2 unless it's in the context of having tested whether the match worked or not.$file_contents =~ m/^.*(\\|/\)(.*)/; my $name = $2;
Since that match could fail, you have no idea what's in $2 at this point. Could be from a previous match.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In Section
Seekers of Perl Wisdom