Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I was hoping this would produce a nice list, however this doesn't seem to pick up the variables.#!/usr/bin/perl -w use strict; use CGI ':standard'; my ($oneaye,$twobee,$threesee,$fourdee,$fiveee); my line; print "Content-type: text/html\n\n"; open (PAGE, "$data") or die "Can't open $data: $!"; while (<PAGE>) { ($oneaye,$twobee,$threesee,$fourdee,$fiveee) = split "\t",$line; unless ($threesee eq "") { print "three = $threesee<br>"; print "four = $fourdee<br>"; } }
Can someone explain my mistake(s)?
Many thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: extracting a list from a file
by jasonk (Parson) on Mar 05, 2003 at 16:22 UTC | |
|
Re: extracting a list from a file
by perlguy (Deacon) on Mar 05, 2003 at 16:40 UTC | |
|
Re: extracting a list from a file
by Anonymous Monk on Mar 05, 2003 at 17:13 UTC | |
|
Re: extracting a list from a file
by hgolan30 (Initiate) on Mar 05, 2003 at 17:26 UTC |