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
On Tue, 10 Apr 2012 01:07:32 +0200
"Jenda Krynicky" wrote:
> > Hi all,
> > Let's say I use Template:Toolkit like this:
> >
> > <-snip--->
> > #! /usr/bin/perl
> >
> > use strict;
> > use warnings;
> >
> > use Template;
> >
> > my $variables = { nrme => "Manfred
On Mon, 09 Apr 2012 17:03:13 -0400
Uri Guttman wrote:
> On 04/09/2012 02:28 PM, Manfred Lotz wrote:
> > Hi all,
> > Let's say I use Template:Toolkit like this:
> >
> > <-snip--->
> > #! /usr/bin/perl
> >
> > use strict;
> > use warnings;
> >
> > use Template;
> >
>
Matthew Bonner wrote:
Hi Anamika
I know this thread has focussed on using split -- thought I'd add a
regex powered version for reference/comparison.
cheers
Matthew
use strict;
use warnings;
while () {
my @keys;
@keys = $_ =~ m/(NM_\d+)+/g;
$_ =~ m/\:1\s+(.*)$/;
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
Hi Anamika
I know this thread has focussed on using split -- thought I'd add a
regex powered version for reference/comparison.
cheers
Matthew
use strict;
use warnings;
while () {
my @keys;
@keys = $_ =~ m/(NM_\d+)+/g;
$_ =~ m/\:1\s+(.*)$/;
print "$_ = $1\n"
To: beginners@perl.org
From: Manfred Lotz
Subject:Template::Toolkit question
Date sent: Mon, 9 Apr 2012 20:28:14 +0200
> Hi all,
> Let's say I use Template:Toolkit like this:
>
> <-snip--->
> #! /u
On 04/09/2012 02:28 PM, Manfred Lotz wrote:
Hi all,
Let's say I use Template:Toolkit like this:
<-snip--->
#! /usr/bin/perl
use strict;
use warnings;
use Template;
my $variables = { nrme => "Manfred", };
my $cmd = 'Hi [% name %], how are you.';
my $template
WOW!!! Still to see the world... Thanks :)
On Mon, Apr 9, 2012 at 4:04 AM, John W. Krahn wrote:
> Somu wrote:
>
>> Hello everyone...
>>
>
> Hello,
>
>
> Thanks for the previous replies. I'm really improving!
>> A new problem..
>>
>> Check if the word begins with un or in and has exactly 5 lette
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
>-Original Message-
>From: Chris Charley [mailto:char...@pulsenet.com]
>Sent: Monday, April 09, 2012 9:02
>To: beginners@perl.org
>Subject: [Marketing Mail] Re: Use of SFTP::Foreign with backend
processing
>and having problems ( not apparent within the code ) in getting remote
SFTP
>to quit
On Mon, 9 Apr 2012 20:28:14 +0200
Manfred Lotz wrote:
> Hi all,
> Let's say I use Template:Toolkit like this:
>
> <-snip--->
> #! /usr/bin/perl
>
> use strict;
> use warnings;
>
> use Template;
>
> my $variables = { nrme => "Manfred", };
>
> my $cmd = 'Hi [% n
In before actually helpful people:
This script with an added "OR" (viz. || "::ERR:Cannot print value::") works
as you'd expect
#! /usr/bin/perl
use strict;
use warnings;
use Template;
my $variables = { nrme => "Manfred", };
my $cmd = 'Hi [% name || "::ERR:Cannot substitute variable::" %], how
""Wagner, David --- Sr Programmer Analyst --- CFS"" wrote in message
I am running AS 5.10.1 on Windows XP SP3 and attempting to use
sFTP within my processing communicating to MVS/IBM.
What I am trying to do is to do so many gets, then undef the
variable and re-login and to continue on to end
Hi all,
Let's say I use Template:Toolkit like this:
<-snip--->
#! /usr/bin/perl
use strict;
use warnings;
use Template;
my $variables = { nrme => "Manfred", };
my $cmd = 'Hi [% name %], how are you.';
my $template = Template->new();
$template->process(\$cmd, $
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(/\
On 09/04/2012 14:24, Vyacheslav wrote:
My code
my %attr = (
PrintError => 0,
RaiseError => 0
);
my $dbh = DBI->connect($dsn, $user, $pass, \%attr);
unless ($dbh) {
next;
}
my $query = "SHOW DATABASES";
I use
unless ($dbh) {
next;
} and this work fine.
Thanks
09.04.2012 01:22, Jim Gibson напи
My code
my %attr = (
PrintError => 0,
RaiseError => 0
);
my $dbh = DBI->connect($dsn, $user, $pass, \%attr);
unless ($dbh) {
next;
}
my $query = "SHOW DATABASES";
I use
unless ($dbh) {
next;
} and this work fine.
Thanks
09.04.2012 01:22, Jim Gibson написал:
At 12:50 AM + 4/9/12, Vyachesl
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 Mon, Apr 09, 2012 at 12:59:04PM +0300, Shlomi Fish wrote:
> Hi xiaolan,
>
> On Mon, 9 Apr 2012 16:13:36 +0800
> xiaolan wrote:
>
> > Hi,
> >
> > I just want to send email using MIME::Lite with Net::SMTP::SSL.
> > But MIME::Lite is going only with Net::SMTP by default.
> > So I searched and f
Hi Fabrizio,
see below for my response.
On Fri, 6 Apr 2012 03:30:46 -0700 (PDT)
Fabrizio Di Carlo wrote:
> Hello to all,
>
> I'm very newbie of Perl but every I'm understanding how is powerful this
> language, but I have a problem:
>
> I'm using Perl with Selenium for scraping data (for a jo
On 04/08/2012 01:08 AM, Bryan Harris wrote:
Hello there!
I love perl's ability to "stack" processing without intermediate variables,
e.g. to read in a pipe, strip off commented lines, pull out column 5, and
join, I can just do this:
$txt = join "", map { (split)[4] } grep { !/^#/ }<>;
Wha
Hi ExecMan,
On Thu, 5 Apr 2012 13:44:57 -0700 (PDT)
ExecMan wrote:
> Hi,
>
> We have a Perl script that sends out emails. It reads a sequential
> file and sends out the emails. The file is big, like 500,000 lines.
>
> Sometimes this process has gone down and it is a pain to see whom
> we've
So these files contain email addresses or something else?
In any case, you may store the line number of the last read email address in a
separate file, say status.log.
When the process starts, check for the existences of this file, and read the
content ( may be last line or first line, depends on
On 2012-04-08 07:08, Bryan Harris wrote:
I love perl's ability to "stack" processing without intermediate variables,
e.g. to read in a pipe, strip off commented lines, pull out column 5, and
join, I can just do this:
$txt = join "", map { (split)[4] } grep { !/^#/ }<>;
What I haven't figure
Hi Bryan,
On Sun, 08 Apr 2012 00:08:48 -0500
Bryan Harris wrote:
>
>
> Hello there!
>
> I love perl's ability to "stack" processing without intermediate variables,
> e.g. to read in a pipe, strip off commented lines, pull out column 5, and
> join, I can just do this:
>
> $txt = join "", ma
Hello there!
I love perl's ability to "stack" processing without intermediate variables,
e.g. to read in a pipe, strip off commented lines, pull out column 5, and
join, I can just do this:
$txt = join "", map { (split)[4] } grep { !/^#/ } <>;
What I haven't figured out is how to do a substit
Hi,
We have a Perl script that sends out emails. It reads a sequential
file and sends out the emails. The file is big, like 500,000 lines.
Sometimes this process has gone down and it is a pain to see whom
we've sent to and whom we have not.
Is there a way within the script to remove the addres
Hello to all,
I'm very newbie of Perl but every I'm understanding how is powerful this
language, but I have a problem:
I'm using Perl with Selenium for scraping data (for a job) the code looks like
this
[code]
use strict;
use warnings;
use Time::HiRes qw(sleep);
use Test::WWW::Selenium;
use T
Hi xiaolan,
On Mon, 9 Apr 2012 16:13:36 +0800
xiaolan wrote:
> Hi,
>
> I just want to send email using MIME::Lite with Net::SMTP::SSL.
> But MIME::Lite is going only with Net::SMTP by default.
> So I searched and found a hack:
>
> use Net::SMTP::SSL;
> BEGIN { @MIME::Lite::SMTP::ISA = qw(Net::
On Mon, Apr 09, 2012 at 04:13:36PM +0800, xiaolan wrote:
> Hi,
>
> I just want to send email using MIME::Lite with Net::SMTP::SSL.
> But MIME::Lite is going only with Net::SMTP by default.
> So I searched and found a hack:
>
> use Net::SMTP::SSL;
> BEGIN { @MIME::Lite::SMTP::ISA = qw(Net::SMTP::S
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
Hi,
I just want to send email using MIME::Lite with Net::SMTP::SSL.
But MIME::Lite is going only with Net::SMTP by default.
So I searched and found a hack:
use Net::SMTP::SSL;
BEGIN { @MIME::Lite::SMTP::ISA = qw(Net::SMTP::SSL); }
This does work, now I can send messages with SMTPs.
But how does
36 matches
Mail list logo