On Thursday 10 Feb 2011 09:13:34 terry peng wrote:
> Wed, 9 Feb 2011 22:44:10 -0800 (PST) письмо от "C.DeRykus"
:
> > On Feb 9, 10:07 pm, terry.p...@mail.ru (terry peng) wrote:
> > > hello,
> > >
> > > when in the case "return undef" I prefer just "return" coz in list
> > > context
> >
> > it wi
Thu, 10 Feb 2011 10:04:55 +0200 письмо от Shlomi Fish :
>
> In List context it will return an empty list. You may have meant in scalar
> context in which case:
>
>
Sorry , my typo.
I did mean the scalar context.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional com
On Feb 9, 8:13 pm, shawnhco...@gmail.com (Shawn H Corey) wrote:
> On 11-02-09 04:52 PM, gry wrote:
>
>
>
> > [[v5.8.8 built for x86_64-linux-thread-multi]
> > #!/usr/bin/perl -W
> > use Getopt::Long;
> > my $dml = 0;
> > my $iterations = 10;
>
> > my %options = ("dml!" => \$dml,
> > "ite
Terry,
Here is my understanding:
You can try defined function to verify the return value in List context, you
can find the return value is (undef) instead of undef once the condition is
false. Because you are using @result=&yoursubName instead of
$result=&yoursubName.
Please correct me if I w
On 11-02-09 08:57 PM, Jim Green wrote:
Hello:
I have some static data I want to wrap in a Data.pm, what is the best
way of doing this.
package data;
package Data; # unless it's a pragmatic, it's capitalized
use strict;
use warnings;
my $data=1;
This is lexically scoped to the file. Use o
Hi All,
i am using Perl :net:ssh module to connect remotely to server and execute the
remote command
following is the code :
my %opt = ( 'options' => [ 'ForwardAgent yes','RSAuAuthentication
yes','ConnectTimeout 120','ServerAliveInterval 60','ServerAliveCountMax
20','debug 1','identity_files /
> "AW" == Alex Wang02 writes:
AW> Terry,
AW> Here is my understanding:
AW> You can try defined function to verify the return value in List
AW> context, you can find the return value is (undef) instead of undef
AW> once the condition is false. Because you are using
AW> @result=&yo
Is there a way to match and substitute at the same time?
I have an html table where each row contains 11 columns of numbers.
Unfortunately all the numbers have commas separating the thousands, millions,
etc.
To find the number I need to match against [\d,].
What I really want is the capture ar
On 2/10/11 Thu Feb 10, 2011 1:07 PM, "David Jacopille"
scribbled:
> Is there a way to match and substitute at the same time?
>
> I have an html table where each row contains 11 columns of numbers.
>
> Unfortunately all the numbers have commas separating the thousands, millions,
> etc.
>
> To
does "return ()" mean return an empty list, or just mean "return" since "()" is
optional in Perl?
thanks!
2011/2/10 terry peng :
> does "return ()" mean return an empty list, or just mean "return" since "()"
> is optional in Perl?
I would have guessed an empty list, but the best way to find out is to
check. :) According to my tests, it's returning according to context:
#!/usr/bin/env perl
use stric
From: terry peng
To: beginners
Sent: Thu, February 10, 2011 2:07:43 PM
Subject: about return
>hello,
>
>when in the case "return undef" I prefer just "return" coz in list context it
>will return an empty list.
>
>my $exist = ...
>if ($exist) {
> return 1;
>} else {
>return;
>}
>
>the
> "BM" == Brandon McCaig writes:
BM> I would have guessed an empty list, but the best way to find out is to
BM> check. :) According to my tests, it's returning according to context:
this is all well documented. and i posted an explanation earlier in the
thread.
BM> sub test1
BM> {
On Thu, Feb 10, 2011 at 10:20 PM, Uri Guttman wrote:
> this is all well documented. and i posted an explanation earlier in the
> thread.
I didn't realize this was an existing thread. In Google Mail it
appeared as a new thread.
> BM> sub test3
> BM> {
> BM> my @empty_array = ();
>
> BM>
> "BM" == Brandon McCaig writes:
BM> On Thu, Feb 10, 2011 at 10:20 PM, Uri Guttman
wrote:
>> this is all well documented. and i posted an explanation earlier in the
>> thread.
BM> I didn't realize this was an existing thread. In Google Mail it
BM> appeared as a new thread.
>>
On 09/02/2011 21:52, gry wrote:
[[v5.8.8 built for x86_64-linux-thread-multi]
#!/usr/bin/perl -W
use Getopt::Long;
my $dml = 0;
my $iterations = 10;
my %options = ("dml!" => \$dml,
"iterations=i" => \$iterations);
GetOptions(%options) || die "bad options";
printf "dml=$dml\n";
p
16 matches
Mail list logo