Jackie Jackie wrote:
> Ruud:
#!/usr/bin/perl -w
use strict;
local $/ = "\n\n";
my @data = map [ map [ split /\n/ ], split /\n&\n/ ], ;
>
> This time the code worked. Please explain it to me.
Try this version, and find out yourself:
#!/usr/bin/perl -w
use strict;
use Data::Dumper;
local $/
oops. It must be of course:
local $/ = '';
sorry, gabi
-Original Message-
From: Hack, Gabi (ext)
Sent: Wednesday, November 18, 2009 8:57 AM
To: Dr.Ruud; beginners@perl.org
Subject: RE: join lines
Dr.Ruud wrote:
> local $/ = "\n\n";
shorter:
local $\ =
Dr.Ruud wrote:
> local $/ = "\n\n";
shorter:
local $\ = ''; # set record separator to blank line
gabi
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Thanks
This time the code worked. Please explain it to me.
From: Dr.Ruud
To: beginners@perl.org
Sent: Sun, November 15, 2009 9:43:09 PM
Subject: Re: join lines
Jackie Jackie wrote:
> Desired output:
> name1&firstname1&adresse1
> name2&am
Jackie Jackie wrote:
Desired output:
name1&firstname1&adresse1
name2&firstname2&adresse2
name3&firstname3&adresse3
name4&firstname4&adresse4
name5&firstname5&adresse5
etc.
#!/usr/bin/perl -w
use strict;
local $/ = "\n\n";
my @data = map [ map [ split /\n/ ], split /\n&\n/ ], ;
for my $d
On 11/16/09 Mon Nov 16, 2009 1:23 PM, "Jackie Jackie"
scribbled:
> What this means
>
> if( ! length() )
It means evaluate the expression '! length()' in a scalar context, interpret
the value as a logical expression, and branch accordingly.
! is the not operator.
length() is the length ope
! length() )
From: Shawn H Corey
To: Jackie Jackie
Cc: beginners@perl.org
Sent: Sun, November 15, 2009 3:51:04 PM
Subject: Re: join lines
Jackie Jackie wrote:
> I tried to adapt this code to obtain my desired output. I need help. My logic
> is
>
&
Jackie Jackie wrote:
> I tried to adapt this code to obtain my desired output. I need help. My logic
> is
>
> While
> if lines are not empty {do}
> if lines are empty {do}
>
> While
> if lines are not empty {do}
> else for empty lines{do}
>
> I am new to programming. I have problem with logic
Jackie Jackie wrote:
I tried to adapt this code to obtain my desired output. I need help. My logic is
While
if lines are not empty {do}
if lines are empty {do}
While
if lines are not empty {do}
else for empty lines{do}
I am new to programming. I have problem with logic and syntax. So please
I tried to adapt this code to obtain my desired output. I need help. My logic
is
While
if lines are not empty {do}
if lines are empty {do}
While
if lines are not empty {do}
else for empty lines{do}
I am new to programming. I have problem with logic and syntax. So please
explain to me how I so
10 matches
Mail list logo