% cat splitit.pl #!/sur/bin/perl use Getopt::Std; getopts( 'c:' ); while(<>) { chomp; (@columns) = split /$opt_c/; } foreach $col (@columns) { print "[$col]\n"; }