Dave K wrote: > Here is one script I used to inspect files > > use strict; > my $fn; > print"Enter the name of a file you want to examine "; > while (<>) {
It is better to write this as while (<STDIN>). The reason being if all the command line arguments (if any are provided) have not been shifted out, a <> will treat the next available arg as a file and try to read from it. This is not an issue if the script takes no command line args, but still... > > $fn = $_; > last if $fn; > } This could just have been written as chomp ($fn = <STDIN>). To reply to the OP's question Setting $/ (Input Record Separator, perldoc perlvar) to " " might help. This assumes that your symbols are separated by just one space. Another option would be to read in line by line and split on \s+ to get the individuals symbols. HTH, Sudarsan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]