Richard Lee wrote:
Thanks John for detailed explanation!!
I just dont' understand why \ (also didn't know that within [ ], \ has
to be escaped.) needs to be watch out for within " " ..
\ use can be tricky, for example:
$ perl -le"print 'hello'"
hello
$ perl -le"print 'he\llo'"
he\llo
$ perl
John W. Krahn wrote:
In the case of:
my_function "foo", "bar";
my_function is a list operator which has a very low precedence so the
parentheses are not required.
Sometimes, i.e. if the sub is not predeclared, they are required.
C:\home>type test.pl
my_function "foo", "bar";
sub my_function
Joel wrote:
when calling functions, we need not include parantheses, and we're
still able to pass a list..
like for eg:
my_function "foo", "bar"; #this copies foo and bar into @_ of
my_function.
but alternately the same assignment like @_ = "foo", "bar";
will omit "bar" from the list.. why is
[EMAIL PROTECTED] wrote:
I have a regular'ol ASCII file which I'll need to read only the first
line, and parse the three numbers that are seperated by commas and
print the results.
How do I go about opening this file, reading the first line, parsing
the three numbers into variables,
This
[EMAIL PROTECTED] wrote:
Hey Perl Guru's:)
I'm hoping that someone can help me out... I have a regular'ol ASCII
file which I'll need to read only the first line, and parse the three
numbers that are seperated by commas and print the results.
This file will always consist of the same lines, but t
you can use hash,where key is the column and value is the refrence to an
array,and this array can contain multiple data.
--Hridyesh
Gunnar Hjalmarsson wrote:
Bobby wrote:
I have a text file with five colums of data (ColumA-E). Within each
column there could be multiple data with a comma seper
Hey Perl Guru's:)
I'm hoping that someone can help me out... I have a regular'ol ASCII
file which I'll need to read only the first line, and parse the three
numbers that are seperated by commas and print the results.
This file will always consist of the same lines, but the numbers will
be differen
when calling functions, we need not include parantheses, and we're
still able to pass a list..
like for eg:
my_function "foo", "bar"; #this copies foo and bar into @_ of
my_function.
but alternately the same assignment like @_ = "foo", "bar";
will omit "bar" from the list.. why is this?
Thanks,
Ken Foskey wrote:
>
For the record on a more complex script than the address one...
xml:simple 7 hours plus on very quick machine, still running and
absolutely hammering the system, 1.3 Gig of memory used.
xml::twig 1 hour on laptop (underpowered and not much memory), Linux
still usable whil
Bobby wrote:
I have a text file with five colums of data (ColumA-E). Within each
column there could be multiple data with a comma seperating each piece of
data. How do i white a loop to parse through the data set and assign
each column a variable and each piece of data within that column a
differ
Bobby wrote:
I have a text file with five colums of data (ColumA-E). Within each
column there could be multiple data with a comma seperating each piece of
data. How do i white a loop to parse through the data set and assign
each column a variable and each piece of data within that column a
differ
I have a text file with five colums of data (ColumA-E). Within each
column there could be multiple data with a comma seperating each piece of
data. How do i white a loop to parse through the data set and assign
each column a variable and each piece of data within that column a
different variable?
On Mon, Mar 17, 2008 at 4:47 PM, Dermot <[EMAIL PROTECTED]> wrote:
snip
> print $fh $status."\n";
> print STDERR "$0: $! $?\n";
snip
$? holds the status returned by the last external call (call to
system() function, pipes, qx// operator, call to wait() or waitpid(),
For the record on a more complex script than the address one...
xml:simple 7 hours plus on very quick machine, still running and
absolutely hammering the system, 1.3 Gig of memory used.
xml::twig 1 hour on laptop (underpowered and not much memory), Linux
still usable while running.
Definitely
I have always avoided the "Program Files" default directory when
installing anything with a Unix flavor to it. For Perl, everything gets
installed at "D:\perl", just to avoid this problem. Even Microsoft
applications don't all know how to handle paths with spaces. It was not
one of their better inn
Siegfried Heintze (Aditi) wrote:
It looks like the CPAN program does not anticipate paths with spaces
in them.
So it seems. You may want to try other methods to install the module.
http://search.cpan.org/src/SBECK/Date-Manip-5.48/INSTALL
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-b
i installed Tk and Devel::ptkdb on my mac.
a test run of ptkdb gave me the following error:
couldn't connect to display ":0" at
/Library/Perl/5.8.6/darwin-thread-multi-2level/Tk/MainWindow.pm line 55.
MainWindow->new() at /System/Library/Perl/5.8.6/Devel/ptkdb.pm line 1147
Can't call method "setup_
Can someone advise me as to where I should put the quotes? All I did was type
perl -MCPAN -e 'install Date::Manip'
Somewhere the is a perl script that needs to be edited. Can someone tell me
what script this is?
Thanks,
Siegfried
-Original Message-
From: Mike Wohlrab [mailto:[EMAIL PROT
Dear List
I have a question regarding this client - server script. I am using two
modules in my script . One is IO::Socket and another is IO::Select. Now my
question is if I want to implement an architecture so that client script
will send a command to the server* [*which doesn't require root priv
Ken Foskey wrote:
On Tue, 2008-03-18 at 00:55 +1100, Ken Foskey wrote:
I am extracting addresses from an XML file to process through other
programs using pipe delimiter the following code works but this is going
to get 130,000 records through it it must be very efficient and I cannot
follow the
JBallinger wrote:
>
On Mar 14, 3:26 pm, [EMAIL PROTECTED] (Manoj) wrote:
>>
When using Data: Dumper is taking more time for my 1 lines of CSV file.
This solved a few queries...and the benchmark was a new value addition for
me. Thanks
2) Is there any optimal method for reading a CSV fi
John W. Krahn wrote:
Richard Lee wrote:
Took your advice and start to read 'Mastering regular expression' by
Jeffrey E.F.Friedl,
Can you explain below further?
on page, 205
push(@fields, $+) while $text =~ m{
"([^\"\\]*(?:\\.[^\"\\]*)*)",? #standard quoted string(with
possible co
- Original Message
From: JBallinger <[EMAIL PROTECTED]>
To: beginners@perl.org
Sent: Monday, March 17, 2008 9:18:12 PM
Subject: Re: Hash & CSV
On Mar 14, 3:26 pm, [EMAIL PROTECTED] (Manoj) wrote:
> When using Data: Dumper is taking more time for my 1 lines of CSV file.
> This solved a
Richard Lee wrote:
Took your advice and start to read 'Mastering regular expression' by
Jeffrey E.F.Friedl,
Can you explain below further?
on page, 205
push(@fields, $+) while $text =~ m{
"([^\"\\]*(?:\\.[^\"\\]*)*)",? #standard quoted string(with
possible comma)
| ([^,]+),?
24 matches
Mail list logo