in reply to Re: Remote Directory listing
in thread Remote Directory listing

Yes, it's possible to match a regex against these strings. Your code can be optimized like this:
open(FILE, "<filelist.txt"); @file = <FILE>; chomp @file; close FILE; open (MYFILE, '>links.txt'); for my $i (1..10) { print MYFILE "$file[-$i]"; print "$1\n" if $file[-$i] =~ m/(\d{8}_\d{4})/; } close (MYFILE);
Sorry if my advice was wrong.