splitはスラッシュ指定
~>echo $PATH | perl -nl -MData::Dumper -e '@a = split(':', $_);print Dumper(\@a);' syntax error at -e line 1, near "split(:" Execution of -e aborted due to compilation errors. #おっと。。 ~>echo $PATH | perl -nl -MData::Dumper -e '@a = split(/:/, $_);print Dumper(\@a);' $VAR1 = [ '/usr/local/bin', '/usr/bin', '/cygdrive/c/WINDOWS/system32', ... '/usr/openwin/bin' ];