Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; my $special ="/path/special.txt"; my ($P_N,$N__B,$N__G,$dry,$my,$by,$Dad,$gyrate,$curd); my $count; print "Content-type: text/html\n\n"; open (PAGE, "$special") or die "Can't open $special: $!"; flock (PAGE, 1) or die "Can't lock $special for reading"; while (defined (my $line = <PAGE>)) {print "$line<br>"; $count++; $line = chomp ($line); ($P_N,$N__B,$N__G,$dry,$my,$by,$Dad,$gyrate,$curd) = split "\t",$l +ine; } print "$P_N,$N__B,$N__G,$dry,$my,$by,$Dad,$gyrate,$curd";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: array split problems
by jonnyfolk (Vicar) on Jan 20, 2004 at 16:35 UTC | |
by Anonymous Monk on Jan 20, 2004 at 16:41 UTC | |
by neuroball (Pilgrim) on Jan 20, 2004 at 17:29 UTC | |
by Roy Johnson (Monsignor) on Jan 20, 2004 at 17:29 UTC | |
|
Re: array split problems
by hardburn (Abbot) on Jan 20, 2004 at 14:55 UTC |