Dear all,
I would like to construct a hash, whose value holds a reference to an
array of arrays,
however all the keys in my hash have the exact same value, which turns
out to be the value of the last element I put it!!
I felt that something is wrong in the data structure, that I should not
keep
I have two perl programs
x1.pl and x2.pl
In x1.pl, I really want to call x2.pl as a function to finish the task,
is there a way to pack them so they can use one another?
thank you!
-Jennifer
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
> -Original Message-
> From: Jennifer Pan
> Sent: Tuesday, August 21, 2001 6:08 PM
> To: '[EMAIL PROTECTED]'
> Subject: hash, key value
>
> Dear all:
> I would like to construct a hash, the value of each key is a bunch of
> ref
I have a file :
#myfile.txt
a b c d
a c s g
g o y g
_END_
I wrote a perl script to put each line into a list;
#/usr/bin/perl -w
open (FH, "myfile.txt") ;
while ($LINE = ) {
chomp $LINE;
push @list, $LINE;
}
close FH;
print $_
I have a hash and the 'value' associated with each key is an array of
strings.
(I do not care the strings are in order, so I suppose an embedded hash
would do too);
I want to print out the keys and each element of the array that
associated with each key
I did:
foreach $key (keys %hash) {
pri
Apologize for the naivety, but
there are so many modules related with LWP at cpan ( I searched for
LWP), which one do I download?
And how do I know if we already have LWP module at our local machine?
thank you very much!!
-Jennifer Pan
-Original Message-
From: Jos I. Boumans [mailto
thanks all! This works, and I am reading Perl cookbook.
-Original Message-
From: Jeff 'japhy/Marillion' Pinyan [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 10, 2001 10:44 AM
To: Jennifer Pan
Cc: [EMAIL PROTECTED]
Subject: Re: grep repetitive elements?
On Aug 10, J
I have two list,
@list1 and @list2, each element @list1 is unique (could be a hash I
suppose)
I want to find out all the elements @list2 that is an element in list1
and have appeared two or more times
I want to use GREP but I don't know how to grep certain element only
when it happens >2 times,
sorry to ask this as I saw the same question but cannot remember the
answer.
if I have a hash, how do I get rid of the elements that appear more than
once?
thank you very much
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I want to download a page, and want to save it in an array to parse it
later on,
I did
#usr/local/bin/perl
my @list;
$URL1= "http://blablabla";;
$command="/opt/sfw/bin/wget -nv -O @list $URL1";
system "$command";
print @list;
it didn;t work. But if I say
$command="/opt/sfw/bin/wget -nv -O list
many thanks, jos and maxim, your suggestions were very helpful.
jennifer
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I want to test if "AF1" is in my list @mylist;
I did:
foreach $LIST (@mylist) {
if ($LIST = "AF1")
$boolean = 1;
else
$boolean = 0;
}
is there a more elegant way to do it?
many thanks
jennifer
--
To unsubscribe, e-mail: [EMAIL PROTEC
I download the matrix module from CPAN ,
http://search.cpan.org/doc/ULPFR/Math-Matrix-0.3/README,
$a = new Math::Matrix ([rand,rand,rand],
[rand,rand,rand],
[rand,rand,rand]);
, but I am still at lost as to how to construct a matrix
so if I want
Hello all,
I stdin a file name: xxx.txt
and I would like to have a output file name called x.txt.yyy
This is how I do it
$FILENAME = ;
$output = "$FILENAME.y";
print "$output";
And the result is only
.yyy
How do I concatenate $FILENAME and .yyy?
Thank you
Hello all, I came across this problem opening up files that are fed in
from command line using "ls". I do not know why this script did not
work. Appreciated any input.
#!/usr/local/bin/perl
# I am trying to feed all the files in this directory to do text
processing and save the processed txt i
15 matches
Mail list logo