Thanks much for your detail explanation.
What if I'm doing a fetch (array refs) within a while
loop and want to assign them to a maxtrix each loop?
before (in my another large clunky program i have
written) I simply fetch and print in the same loop.
Now that I am incorporating your code help for
this explained just about everything and was 10 times less confusing than my
own broken code.
where I really get confused in Perl is different situations will return
ARRAY reference and
others will return the element.
as an example (printf is obviously better), if i were to do a
print @$line . "
use strict;
use warnings;
my @newarray;
my ($xnumvar,$xvar,$ynumvar,$yvar,@maxlength);
my @newmatrix=(["123.45","JOHN DOE","Coal Miner"],
["12.45","MR. PEANUT","peanut"],
["4.1","Bill Clinton","unknown"]);
# iterate through each element and gather maximum character length for
Title: Tk::Entry, how can enter key within it run a sub
given the following:
my($input) = $frame3->Entry(-width => 150,
-background => 'white',
-foreground => 'black',
-textvariable=> \$inputcmd)->pack;
H
Title: perl sed like operations was RE: [Perl-unix-users] perl equivalent to "cut"
Thanks for all the excellent examples, I learned a whole lot more than I bargained for.
I am currently working on converting korn scripts that I have written over to PERL
for the experience. The following h
Title: perl equivalent to "cut"
how can I do the equivalent of
$ echo "BLAH=VALUE ONE" | cut -f2 -d'='
VALUE ONE
in perl?
'name' => 'CAROL',
'nums' => [
'22',
'32'
]
};
Im still stuck on why neither logic against the values or trying to print
the array values is working. I&
;
}
which is only printing the first value so i tried throwing an [] field indicator around there and it would give syntax error
-Original Message-----
From: Markham, Richard
Sent: Tuesday, May 27, 2003 10:55 AM
To: '[EMAIL PROTECTED]'
Subject: RE: [Perl-unix-users] not unders
Title: foreach and an array of hashes
is it possible to foreach through and array of hashes
and reference the objects attributes?
In testing I am just trying to print each employee name.
my @emp;
$emp[0]=new_employee("Bob",50,"Cook");
$emp[1]=new_employee("Jane",20,"Receptionist");
$emp[2]
Title: combining functions & using there return values
in the following scenario I tried to nest lc() within a grep and wasn't able
to get expected results. the following greps the output of unix "ps" looking
for Oracle SID apache processes and is expecting a count greater than 0.
if ((grep
10 matches
Mail list logo