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
[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
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
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
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);
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: