At 5:05 AM +0100 4/10/12, Rob Dixon wrote:
Jim Gibson wrote:
Tiago Hori wrote:
Just so I make sure I understand it correctly: So every time I use a while
() loop each line of input from the file gets assigned to $_ in
each iteration of the loop?
Almost.
<> is an operator. Each time is eva
On 10/04/2012 07:40, Dr.Ruud wrote:
On 2012-04-10 06:05, Rob Dixon wrote:
while () {
:
}
is identical to
while (readline FILEHANDLE) {
:
}
which compiles as
while (defined($_ = readline FILEHANDLE)) {
:
}
Not accurate, you can check with -MO=Deparse.
Please explain what you think is ina
On 2012-04-10 06:05, Rob Dixon wrote:
while () {
:
}
is identical to
while (readline FILEHANDLE) {
:
}
which compiles as
while (defined($_ = readline FILEHANDLE)) {
:
}
Not accurate, you can check with -MO=Deparse.
--
Ruud
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
Jim Gibson wrote:
Tiago Hori wrote:
Just so I make sure I understand it correctly: So every time I use a while
() loop each line of input from the file gets assigned to $_ in
each iteration of the loop?
Almost.
<> is an operator. Each time is evaluated, a line is read from
the file and ass
Jim Gibson wrote:
On 4/9/12 Mon Apr 9, 2012 12:22 PM, "Tiago Hori"
scribbled:
Hey Jim,
Makes perfect sense now. Thanks.
Just so I make sure I understand it correctly: So every time I use a while
() loop each line of input from the file gets assigned to $_ in
each iteration of the loop?
Al
On 4/9/12 Mon Apr 9, 2012 12:22 PM, "Tiago Hori"
scribbled:
> Hey Jim,
>
> Makes perfect sense now. Thanks.
>
> Just so I make sure I understand it correctly: So every time I use a while
> () loop each line of input from the file gets assigned to $_ in
> each iteration of the loop?
Almost.
Hey Jim,
Makes perfect sense now. Thanks.
Just so I make sure I understand it correctly: So every time I use a while
() loop each line of input from the file gets assigned to $_ in
each iteration of the loop?
Cheers,
Tiago
On Mon, Apr 9, 2012 at 1:00 PM, Jim Gibson wrote:
> At 10:21 AM -0230
At 10:21 AM -0230 4/9/12, Tiago Hori wrote:
Sorry guys,
Another quick question:
I got this from perlmonks:
#!/usr/bin/perl -w use strict; my @desired_cols = qw(colname1 colname3);
#order matters here # reads first line to get actual column names my
$header_line = (); my @actual_cols = split(/\
Sorry guys,
Another quick question:
I got this from perlmonks:
#!/usr/bin/perl -w use strict; my @desired_cols = qw(colname1 colname3);
#order matters here # reads first line to get actual column names my
$header_line = (); my @actual_cols = split(/\s+/,$header_line); # get
column number of the
Hi All,
Thanks for all your inputs.
Part of the problem I was having is that I was creating tab delimited files
in excel and I forgot the excel uses a different way to create newlines,
right? I remember having the same issue with MySQL. Now, i got it working!
Is there way around this issue?
Tha
On 2012-04-09 03:12, Tiago Hori wrote:
Is there any way that I could parse a row at a time
while ( <$fh> ) {
$_ eq 'foo' and print "$.:$_\n"
for split /\t/;
}
--
Ruud
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@p
At 10:42 PM -0230 4/8/12, Tiago Hori wrote:
Hi Guys,
I know there are modules for parsing tab delimited files, but I am
trying to develop a script as a learning exercise to learn the
better, so any help would be appreciated.
Let's say I have two columns and two rows:
Joe \t Doe
Jane \t Doe
9, 2012 6:42 AM
> Subject: Help parsing tab delimited files
>
> Hi Guys,
>
> I know there are modules for parsing tab delimited files, but I am trying to
> develop a script as a learning exercise to learn the better, so any help
> would be appreciated.
>
> Let'
Tiago Hori wrote:
Hi Guys,
Hello,
I know there are modules for parsing tab delimited files, but I am
trying to develop a script as a learning exercise to learn the better,
so any help would be appreciated.
Let's say I have two columns and two rows:
Joe \t Doe
Jane \t Doe
So here is what I
replace @array = split (/\t/, $_); with
@array = split;
From: Tiago Hori
To: beginners@perl.org
Sent: Monday, April 9, 2012 6:42 AM
Subject: Help parsing tab delimited files
Hi Guys,
I know there are modules for parsing tab delimited
Hi Guys,
I know there are modules for parsing tab delimited files, but I am trying to
develop a script as a learning exercise to learn the better, so any help would
be appreciated.
Let's say I have two columns and two rows:
Joe \t Doe
Jane \t Doe
So here is what I got:
#!usr/bin/perl
use st
16 matches
Mail list logo