- or download this
($dirfilename = $url) =~ s|\Qhttp://foo.bar.com/\E||;
- or download this
@bindirs = qw( /usr/bin /bin /usr/local/bin );
for (@libdirs = @bindirs) { s/bin/lib/ }
...
__OUTPUT__
/usr/lib /lib /usr/local/lib
- or download this
($a = $b) =~ s/x/y/g; # copy $b and then change $a
$a = ($b =~ s/x/y/g); # change $b, count goes in $a