Re: don't understand error message on print line

2001-04-26 Thread Paul Johnson
On Thu, Apr 26, 2001 at 02:49:41PM +0100, Gary Stainburn wrote: > If I remove the line, the error goes away so it is definitely > complaining about the print statement, but it looks perfectly fine to > me. Well there's nothing wrong with the print statement as such, it's just that the value yo

don't understand error message on print line

2001-04-26 Thread Gary Stainburn
Hi all, Using the following code:- 63 foreach (@fieldmap) { 64 my ($dbfield,$field)=(split(/:/))[0,$fieldno]; 65 print "dbfield='$dbfield' field='$field'\n"; 66 &addtext($dbfield,$fields{$field}) if ( $field ne '' && \ $fields{$field}); 67 } with the following data:- $

Re: don't understand error message on print line

2001-04-26 Thread Kevin Meltzer
Hi Gary, What are you expecting to print? I am assuming you want: dbfield='pickno' field='PICKNO' If so, you can a) make $fieldno=1, or remove that array slice off so you have: my ($dbfield,$field)=(split(/:/))[0,$fieldno]; But, since the piece of the split you are looking for doesn't have a

Re: don't understand error message on print line

2001-04-26 Thread John Joseph Trammell
On Thu, Apr 26, 2001 at 02:49:41PM +0100, Gary Stainburn wrote: > Hi all, > > Using the following code:- > > 63 foreach (@fieldmap) { > 64 my ($dbfield,$field)=(split(/:/))[0,$fieldno]; > 65 print "dbfield='$dbfield' field='$field'\n"; > 66 &addtext($dbfield,$fields{$field}) if ( $field n