in reply to using split on a string

You are splitting on a whitespace so it only splits it once (because you only have two variables to throw it in) and throws the rest out. What you want is:
my $pubupload = q"C:\Documents and Settings\Administrator\Desktop\chin +a.txt"; $pubupload =~ /(?:.*)\\(.*?\..*)$/; print $1;

When ran, the code gives this output:
china.txt
And of course to fine the extension, you can split it up from there.

($junk, $extension)=split/\./,$1;/;
NOTE: I couldn't get split/\./,$pubupload; to work on the whole string, any ideas why?

Tiptoeing up to a Perl hacker.
Dave AKA damian