LWP::Simple problem: CGI related?

2004-03-24 Thread Jack Chen
Hi, I just found that a script I wrote before stopped working. The problem is that the 'get' method returns an undef. So I wrote a test script like: #!/usr/bin/perl -w use strict; use LWP::Simple; use CGI qw(:standard); my $content = get qw(http://yahoo.com); print $content; When I ran the ab

Re: what is this data structure?

2004-01-16 Thread Jack Chen
Hi Randy, Thanks for reply! It is strage. When I tried the script on another machine, it works the way you described. Anything wrong about my perl or my OS (Linux 8)? Jack On Fri, 16 Jan 2004, Randy W. Sims wrote: > On 1/16/2004 11:03 AM, Jack Chen wrote: > > > Hi, >

what is this data structure?

2004-01-16 Thread Jack Chen
Hi, I don't know how to work with this data structure: my @array = ((a => 'appple'), (b => 'tree'), (c => 'chair')); when I do: print @array; I get no output. when I do: use Data::Dumper; print Dumper(@array); I got the conten

Re: Using alternatives and anchors

2003-02-18 Thread Jack Chen
> I am writing a script that will read from a file named myfiles not stdin and print >the lines containing the following words "everywhere" or 'nowhere. > > > > #!/usr/bin/perl > #use strict > while (<>) { > chomp; > if (/^everywhere$|^nowhere$/) > print > > } > > How do I invoked

How do I know if a perl module is installed?

2002-10-20 Thread Jack Chen
Thought there is some easy way bu could not find. Thanks! Jack Jack Chen, Stein Lab, Cold Spring Harbor Labs 1 Bungtown Road, Cold Spring Harbor, NY, 11724 Tel: 1 516 3676904; e-mail: [EMAIL PROTECTED