#!/usr/bin/perl $i = 0; for (@ARGV) { if (/^;$/) { $command .= '; '; next; } if (/^&&$/) { $command .= '&& '; next; } if (/^\|\|$/) { $command .= '|| '; next; } if (/^\|$/) { $command .= '| '; next; } s/"/"'"'"/g; s/\$/\\\$/g; s/\\\$\+/\$/g; $command .= "\"$_\" " } while () { chomp($ENV{x} = $_); system($command); }