#!/usr/bin/perl while ($line = <>){ @record = split(/\|/, $line); $fields = @record - 1; if ( open(OUTFILE, ">>$record[0]") ) { $" = "\|"; print @record[1..$fields]; } else { die("cannot open $record[0]"); } }
In reply to $" seems not to be working by azool
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |