T
Toby A Inkster
Toby said:#!/usr/bin/perl
$a = shift @ARGV;
system("sed -i 's/" . shift @ARGV . '/' . shift @ARGV . "/g' $a");
Dammit! That'll teach me not to test my scripts before posting! Order of
precendence...
#!/usr/bin/perl
$a = shift @ARGV;
system("sed -i 's/" . (shift @ARGV) . '/' . (shift @ARGV) . "/g' $a");
And here's a shorter one...
#!/usr/bin/perl
system("sed -i 's/".$ARGV[++$a].'/'.$ARGV[++$a]."/g' ".$ARGV[$b]);