Re: Printing an array within a hash

2006-10-02 Thread John W. Krahn
Johnson, Reginald (GTI) wrote: > I am trying to print the contents of the array from within the hash. I > see that I can do it by > > print "$name: $items[0][0] $items[0][1] $items[0][2] $items[0][3] \n " > > Is there a better way to accomplish this, especially if I don't know the > number of i

Re: Printing An Array

2006-02-26 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > Currently I have my script print in a long list .csv file. I need to > print my long list into rows of 20 elements. How can I go about doing > this? > > while ($x = ) > { > > chop $x; > @arr = split /\s+/,$x; > $temp = @arr; > print "$arr[$temp -1],\n"; > > } Based

Re: Printing an Array

2003-07-31 Thread Rob Dixon
Josimar Nunes De Oliveira wrote: > Hi, > Pablo, you should write this at line of IF command: > if($count>0 && $count<$#archivo) { > I hope you get the right thing you want. Hi Pablo. Josimar's right, and it also looks like you're not using 'strict'? You may prefer the following, which avo

Re: Printing an Array

2003-07-30 Thread Josimar Nunes de Oliveira
Hi, Pablo, you should write this at line of IF command: if($count>0 && $count<$#archivo) { I hope you get the right thing you want. Bye, Josimar - Original Message - From: "Pablo Fischer" <[EMAIL PROTECTED]> To: "Perl Beginners" <[EMAIL PROTECTED]> Sent: Wednesday, July 30, 2003

Re: Printing an Array

2003-07-30 Thread Pablo Fischer
Solved; Another case of buffering, the right code: foreach $i (@archivo) { #Dont count the first and last line if($count>$size || $count<$size) { ($correo, $clave, $nombre, $registro, $id, $sexo, $password) = split(/\|/, $i); ($user, $host) = split(/\@/, $correo);

RE: Printing an array reference from within a struct

2001-08-22 Thread Wagner-David
I didn't have the Programming Perl here, so did some checking. Used Data::Dumper and the way it is being set, the children are empty. In the Perl Cookbook under Useing Classes as Structs, I came across one simliar to yours. It showed the way you were doing it and also like: