use strict;
use warnings;
use autodie qw/:all/;
open my $outfile, '>', 'filename.txt';
while (<>) {
if ( m#-/(\w+)\?srt=# ) {
print $outfile $1, "\n";
}
}
close $outfile;
####
use strict;
use warnings;
use autodie qw/:all/;
open my $outfile, '>', 'filename.txt';
while ( <> ) {
while( m#-/(\w+)\?srt=#g ) {
print $outfile $1, "\n";
}
}
close $outfile;
####
use strict;
use warnings;
use autodie qw/:all/;
open my $outfile, '>', 'filename.txt';
{
$local $/ = '?srt=';
while( <> ) {
chomp;
if( m#-/(\w+)$# ) {
print $outfile $1, "\n";
}
}
}
close $outfile;