in reply to extract file name from path
Simple, just rule out dashes from the filename:
my $line = "root 30145 1 0 Jan30 ? 00:09:01 /root/java/app/java_app_1R
print "$1\n" if $line =~ m|/([^/]+)\.java\s|;
Electric eels were invented at the same time as electricity
Before electricity was invented, electric eels had to stun with gas
Results (398 votes). Check out past polls.