in reply to using split on a string
my $pubupload = q"C:\Documents and Settings\Administrator\Desktop\chin +a.txt"; $pubupload =~ /(?:.*)\\(.*?\..*)$/; print $1;
And of course to fine the extension, you can split it up from there.china.txt
NOTE: I couldn't get split/\./,$pubupload; to work on the whole string, any ideas why?($junk, $extension)=split/\./,$1;/;
|
|---|