line 16

line 16

am 03.10.2007 00:49:53 von merl the perl

#!/usr/bin/env perl
use strict;
use warnings;
use Net::NNTP;

my $nntp = Net::NNTP->new('newsgroups.comcast.net', Debug => 1 );
my $USER = '';
my $PASS = '';

$nntp->authinfo($USER,$PASS) or die $!;


$nntp->group('comp.lang.perl.misc')
or die "failed to set group c.l.p.m.\n";
my $msg_ids_ref = $nntp->newnews(time() - 24*60*60);
die "Failed to retrieve message ids\n" unless @{$msg_ids_ref};

open my $ofh, '>', 'articles.txt'
or die "Cannot open articles.txt: $!";
for my $msg_id (@{$msg_ids_ref}) {
$nntp->article($msg_id, $ofh)
or die "Failed to retrieve article $msg_id\n";
}
close $ofh;
__END__
#end script begin comment
q3) Why does perl.exe not like line 16? I've correceted this before but
forget how. Thanks in advance.

gruss,
--
wade ward
"The final irony is that cops
and rodney king have the same IQ."

Re: line 16

am 03.10.2007 01:42:55 von paduille.4061.mumia.w+nospam

On 10/02/2007 05:49 PM, Wade Ward wrote:
> #!/usr/bin/env perl
> use strict;
> use warnings;
> use Net::NNTP;
>
> my $nntp = Net::NNTP->new('newsgroups.comcast.net', Debug => 1 );
> my $USER = '';
> my $PASS = '';
>
> $nntp->authinfo($USER,$PASS) or die $!;
>
>
> $nntp->group('comp.lang.perl.misc')
> or die "failed to set group c.l.p.m.\n";
> my $msg_ids_ref = $nntp->newnews(time() - 24*60*60);
> die "Failed to retrieve message ids\n" unless @{$msg_ids_ref};
>
> open my $ofh, '>', 'articles.txt'
> or die "Cannot open articles.txt: $!";
> for my $msg_id (@{$msg_ids_ref}) {
> $nntp->article($msg_id, $ofh)
> or die "Failed to retrieve article $msg_id\n";
> }
> close $ofh;
> __END__
> #end script begin comment
> q3) Why does perl.exe not like line 16? I've correceted this before but
> forget how. Thanks in advance.
>
> gruss,

Which one is line 16?

Please create a much more descriptive and precise subject line.

Please read and act on the information here:
http://www.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines. html

Re: line 16

am 03.10.2007 02:26:13 von Ron Bergin

On Oct 2, 3:49 pm, "Wade Ward" wrote:
> #!/usr/bin/env perl
> use strict;
> use warnings;
> use Net::NNTP;
>
> my $nntp = Net::NNTP->new('newsgroups.comcast.net', Debug => 1 );
> my $USER = '';
> my $PASS = '';
>
> $nntp->authinfo($USER,$PASS) or die $!;
>
> $nntp->group('comp.lang.perl.misc')
> or die "failed to set group c.l.p.m.\n";
> my $msg_ids_ref = $nntp->newnews(time() - 24*60*60);
> die "Failed to retrieve message ids\n" unless @{$msg_ids_ref};
>
> open my $ofh, '>', 'articles.txt'
> or die "Cannot open articles.txt: $!";
> for my $msg_id (@{$msg_ids_ref}) {
> $nntp->article($msg_id, $ofh)
> or die "Failed to retrieve article $msg_id\n";}
>
> close $ofh;
> __END__
> #end script begin comment
> q3) Why does perl.exe not like line 16? I've correceted this before but
> forget how. Thanks in advance.
>
> gruss,
> --
> wade ward
> "The final irony is that cops
> and rodney king have the same IQ."

It would help if you tell us how perl.exe didn't like it. What was
the error message?

Your shebang line indicates that you're on some form of *nix, but your
reference to perl.exe would indicate that you're on Windows. Which is
it? If you're on *nix, try changing your shebang line to point
directly to the perl binary and see if that makes a difference.

Re: line 16

am 03.10.2007 02:28:40 von Jim Gibson

In article <-9CdnVfbnvufIJ_anZ2dnUVZ_jGdnZ2d@comcast.com>, Wade Ward
wrote:

> #!/usr/bin/env perl
> use strict;
> use warnings;
> use Net::NNTP;
>
> my $nntp = Net::NNTP->new('newsgroups.comcast.net', Debug => 1 );
> my $USER = '';
> my $PASS = '';
>
> $nntp->authinfo($USER,$PASS) or die $!;
>
>
> $nntp->group('comp.lang.perl.misc')
> or die "failed to set group c.l.p.m.\n";
> my $msg_ids_ref = $nntp->newnews(time() - 24*60*60);
> die "Failed to retrieve message ids\n" unless @{$msg_ids_ref};
>
> open my $ofh, '>', 'articles.txt'
> or die "Cannot open articles.txt: $!";
> for my $msg_id (@{$msg_ids_ref}) {
> $nntp->article($msg_id, $ofh)
> or die "Failed to retrieve article $msg_id\n";
> }
> close $ofh;
> __END__
> #end script begin comment
> q3) Why does perl.exe not like line 16? I've correceted this before but
> forget how. Thanks in advance.

Not sure which line is 16. However, the documentation of Net::NNTP says
methods that are supposed to return a value will return undef on
failure. Therefore, you need to test the return value of newnews()
before trying to dereference it as an array:

die "Failed to retrieve message ids\n" unless defined $msg_ids_ref;

--
Jim Gibson

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Re: line 16

am 03.10.2007 14:10:36 von Michele Dondi

On Tue, 02 Oct 2007 17:26:13 -0700, Ron Bergin wrote:

>Your shebang line indicates that you're on some form of *nix, but your
>reference to perl.exe would indicate that you're on Windows. Which is
>it? If you're on *nix, try changing your shebang line to point
>directly to the perl binary and see if that makes a difference.

But the shebang line won't do harm under Windows anyway. In fact I
just include it there all the time too. (Perl processes it anyway for
switches, but that's not the only reason.) However

perl -lpe "$_=sprintf '%02d %s', $., $_" wade.pl

reveals that line 16 is

die "Failed to retrieve message ids\n" unless @{$msg_ids_ref};

So it is not likely that "perl.exe doesn't like that line". I suppose
he's having a runtime error. In fact that script was originally posted
by someone as a minimal example in answer to a question from the OP, a
few months ago. It is to be noted that the test is probably not
correct or at least accurate as it should because if the newnews()
method fails then $msg_ids_ref will be undef and an attempt to
dereference it will result in an error. I also think that this is
probable to happen because the NEWNEWS command seems not to be much
supported by news servers.


Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^ ..'KYU;*EVH[.FHF2W+#"\Z*5TI/ER 256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,

Re: line 16

am 03.10.2007 14:15:26 von Michele Dondi

On Tue, 2 Oct 2007 15:49:53 -0700, "Wade Ward"
wrote:

>Subject: line 16

Please put the subject of your posts in the Subject. Here, it may be
line 16 of quite about any Perl program in the world. The actual error
message you get, or some reasonable portion or adaptation of it, would
have been more appropriate.

>#!/usr/bin/env perl
[snip]
>#end script begin comment
>q3) Why does perl.exe not like line 16? I've correceted this before but

You may have helped us all (to help you!) by putting a comment like

# line 16

on line 16.


Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^ ..'KYU;*EVH[.FHF2W+#"\Z*5TI/ER 256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,

Re: line 16

am 04.10.2007 01:07:48 von merl the perl

"Mumia W." wrote in message
news:13g5luqi5jdfhb4@corp.supernews.com...
> On 10/02/2007 05:49 PM, Wade Ward wrote:
>> #!/usr/bin/env perl
>> use strict;
>> use warnings;
>> use Net::NNTP;
>>
>> my $nntp = Net::NNTP->new('newsgroups.comcast.net', Debug => 1 );
>> my $USER = '';
>> my $PASS = '';
>>
>> $nntp->authinfo($USER,$PASS) or die $!;
>>
>>
>> $nntp->group('comp.lang.perl.misc')
>> or die "failed to set group c.l.p.m.\n";
>> my $msg_ids_ref = $nntp->newnews(time() - 24*60*60);
>> die "Failed to retrieve message ids\n" unless @{$msg_ids_ref};
>>
>> open my $ofh, '>', 'articles.txt'
>> or die "Cannot open articles.txt: $!";
>> for my $msg_id (@{$msg_ids_ref}) {
>> $nntp->article($msg_id, $ofh)
>> or die "Failed to retrieve article $msg_id\n";
>> }
>> close $ofh;
>> __END__
>> #end script begin comment
>> q3) Why does perl.exe not like line 16? I've correceted this before but
>> forget how. Thanks in advance.
>>
>> gruss,
>
> Which one is line 16?
>
> Please create a much more descriptive and precise subject line.
Are you dumb?

> Please read and act on the information here:
> http://www.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines. html

Jesus balls. Line 16 from the top. Shebang is number one.
--

Re: line 16

am 04.10.2007 01:21:51 von Keith Keller

On 2007-10-03, Wade Ward wrote:
>
> "Mumia W." wrote in message
> news:13g5luqi5jdfhb4@corp.supernews.com...
>>
>> Please create a much more descriptive and precise subject line.
> Are you dumb?

Who is more dumb, the dumb or the dumb asking other dumb people questions?

>> Please read and act on the information here:
>> http://www.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines. html
>
> Jesus balls. Line 16 from the top. Shebang is number one.

Did you read the URL? You should if you don't want even more people to
killfile you than already have.

--keith


--
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information

Re: line 16

am 04.10.2007 03:21:00 von paduille.4061.mumia.w+nospam

On 10/03/2007 06:24 PM, Wade Ward wrote:
> "Mumia W." wrote in message
> news:13g5luqi5jdfhb4@corp.supernews.com...
>> On 10/02/2007 05:49 PM, Wade Ward wrote:
>>> #!/usr/bin/env perl
>>> use strict;
>>> use warnings;
>>> use Net::NNTP;
>>>
>>> my $nntp = Net::NNTP->new('newsgroups.comcast.net', Debug => 1 );
>>> my $USER = '';
>>> my $PASS = '';
>>>
>>> $nntp->authinfo($USER,$PASS) or die $!;
>>>
>>>
>>> $nntp->group('comp.lang.perl.misc')
>>> or die "failed to set group c.l.p.m.\n";
>>> my $msg_ids_ref = $nntp->newnews(time() - 24*60*60);
>>> die "Failed to retrieve message ids\n" unless @{$msg_ids_ref};
>>>
>>> open my $ofh, '>', 'articles.txt'
>>> or die "Cannot open articles.txt: $!";
>>> for my $msg_id (@{$msg_ids_ref}) {
>>> $nntp->article($msg_id, $ofh)
>>> or die "Failed to retrieve article $msg_id\n";
>>> }
>>> close $ofh;
>>> __END__
>>> #end script begin comment
>>> q3) Why does perl.exe not like line 16? I've correceted this before but
>>> forget how. Thanks in advance.
>>>
>>> gruss,
>> Which one is line 16?
>>
>> Please create a much more descriptive and precise subject line.
> Are you dumb?
>
>> Please read and act on the information here:
>> http://www.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines. html
>
> Jesus balls. Line 16 from the top. Shebang is number one.

Don't curse. If you curse God, He may curse you.

Please read the posting guidelines anyway. If you've already read them,
read them again.

I'm not trying to be rude to you; I'm giving you good advice that will
dramatically improve the quality of the help you get in this newsgroup.
Of course, Tad Maclellen gets the credit for hosting the guidelines.
Thanks Tad.

To answer your question Wade, evidently NEWNEWS is not supported by
newsgroups.comcast.net. I tried your program with three free news
servers, and only one of them supported NEWNEWS.

Re: line 16

am 04.10.2007 13:31:53 von Michele Dondi

On Wed, 3 Oct 2007 16:24:42 -0700, "Wade Ward"
wrote:

>> Which one is line 16?
>>
>> Please create a much more descriptive and precise subject line.
>Are you dumb?
>
>> Please read and act on the information here:
>> http://www.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines. html
>
>Jesus balls. Line 16 from the top. Shebang is number one.

Yep: it requires all of us who want to help to either:

(i) count manually;
(ii) write a oneliner to print line numbers or
(iii) modify and run your script.

Some of these may be lightweight enough, but get multiplied by the
number of interested persons. Had you siply marked that line with a
comment, you have maximally helped people to help you.


Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^ ..'KYU;*EVH[.FHF2W+#"\Z*5TI/ER 256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,

Re: line 16

am 04.10.2007 13:33:39 von Michele Dondi

On Wed, 3 Oct 2007 16:21:51 -0700, Keith Keller
wrote:

>>> Please create a much more descriptive and precise subject line.
>> Are you dumb?
>
>Who is more dumb, the dumb or the dumb asking other dumb people questions?

:) See and in particular the
third option.


Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^ ..'KYU;*EVH[.FHF2W+#"\Z*5TI/ER 256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,

Re: line 16

am 04.10.2007 13:34:24 von Michele Dondi

On Wed, 03 Oct 2007 20:21:00 -0500, "Mumia W."
wrote:

>To answer your question Wade, evidently NEWNEWS is not supported by
>newsgroups.comcast.net. I tried your program with three free news
>servers, and only one of them supported NEWNEWS.

Incidentally, he's been told so months ago already.


Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^ ..'KYU;*EVH[.FHF2W+#"\Z*5TI/ER 256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,

Re: how do you fix newnews?

am 05.10.2007 03:32:52 von Tad McClellan

Wade Ward wrote:

> Subject: how do you fix newnews?


Take it to a veterinarian.

Oh. I thought you said "mewmews"...


--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"

how do you fix newnews?

am 05.10.2007 03:53:13 von merl the perl

"Mumia W." wrote in message
news:13g8g1ve5ff6v2f@corp.supernews.com...
> On 10/03/2007 06:24 PM, Wade Ward wrote:
>> "Mumia W." wrote in message
>> news:13g5luqi5jdfhb4@corp.supernews.com...
>>> On 10/02/2007 05:49 PM, Wade Ward wrote:
>>>> #!/usr/bin/env perl
>>>> use strict;
>>>> use warnings;
>>>> use Net::NNTP;
>>>>
>>>> my $nntp = Net::NNTP->new('newsgroups.comcast.net', Debug => 1 );
>>>> my $USER = '';
>>>> my $PASS = '';
>>>>
>>>> $nntp->authinfo($USER,$PASS) or die $!;
>>>>
>>>>
>>>> $nntp->group('comp.lang.perl.misc')
>>>> or die "failed to set group c.l.p.m.\n";
>>>> my $msg_ids_ref = $nntp->newnews(time() - 24*60*60);
%%%%%% <----here?

>>>> die "Failed to retrieve message ids\n" unless @{$msg_ids_ref};
>>>>
>>>> open my $ofh, '>', 'articles.txt'
>>>> or die "Cannot open articles.txt: $!";
>>>> for my $msg_id (@{$msg_ids_ref}) {
>>>> $nntp->article($msg_id, $ofh)
>>>> or die "Failed to retrieve article $msg_id\n";
>>>> }
>>>> close $ofh;
>>>> __END__
>>>> #end script begin comment
>>>> q3) Why does perl.exe not like line 16? I've correceted this before
>>>> but forget how. Thanks in advance.
>>>>
>>>> gruss,
>>> Which one is line 16?
>>>
>>> Please create a much more descriptive and precise subject line.
>> Are you dumb?
>>
>>> Please read and act on the information here:
>>> http://www.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines. html
>>
>> Jesus balls. Line 16 from the top. Shebang is number one.
>
> Don't curse. If you curse God, He may curse you.
http://www.zaxfuuq.net/perl5.htm
The big has man heard enough godammits from me to fill a truck. Jesus *did*
have balls.

I won't re-read the posting guidleienes. Shoot me. I've changed the
subject line to reflect what the ultinate question is.

> Please read the posting guidelines anyway. If you've already read them,
> read them again.
>
> I'm not trying to be rude to you; I'm giving you good advice that will
> dramatically improve the quality of the help you get in this newsgroup. Of
> course, Tad Maclellen gets the credit for hosting the guidelines. Thanks
> Tad.
>
> To answer your question Wade, evidently NEWNEWS is not supported by
> newsgroups.comcast.net. I tried your program with three free news servers,
> and only one of them supported NEWNEWS.

That's it. Michele and I found a workaround. I'll reread netnntp. This
will be the first time with glasses but otherwise the fifth.

--
wade ward
"Your boyfriend is not my boyfriend, doll."
>
>

Re: how do you fix newnews?

am 05.10.2007 05:40:59 von Keith Keller

On 2007-10-05, Wade Ward wrote:
>
> I won't re-read the posting guidleienes.

Good luck getting help from clpmisc in the future.

--keith

--
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information

Re: line 16

am 09.10.2007 03:57:16 von merl the perl

"Ron Bergin" wrote in message
news:1191371173.703572.246450@50g2000hsm.googlegroups.com...
> On Oct 2, 3:49 pm, "Wade Ward" wrote:
>> #!/usr/bin/env perl

> Your shebang line indicates that you're on some form of *nix, but your
> reference to perl.exe would indicate that you're on Windows. Which is
> it? If you're on *nix, try changing your shebang line to point
> directly to the perl binary and see if that makes a difference.
>
I'm running xp and using the command line of a dos window. What would be
better?
--
wade ward
"Your boyfriend is not my boyfriend, doll."

Re: line 16

am 09.10.2007 06:25:46 von merl the perl

"Jim Gibson" wrote in message
news:021020071728402299%jgibson@mail.arc.nasa.gov...
> In article <-9CdnVfbnvufIJ_anZ2dnUVZ_jGdnZ2d@comcast.com>, Wade Ward
> wrote:

>> q3) Why does perl.exe not like line 16? I've correceted this before but
>> forget how. Thanks in advance.
>
> Not sure which line is 16. However, the documentation of Net::NNTP says
> methods that are supposed to return a value will return undef on
> failure. Therefore, you need to test the return value of newnews()
> before trying to dereference it as an array:
>
> die "Failed to retrieve message ids\n" unless defined $msg_ids_ref;
>
Testing for return values is a bit more than my current perl game. Thanks
for the heads-up.
--
wade ward
"Your boyfriend is not my boyfriend, doll."

Re: line 16

am 09.10.2007 13:33:37 von Michele Dondi

On Mon, 8 Oct 2007 21:25:46 -0700, "Wade Ward"
wrote:

>Testing for return values is a bit more than my current perl game. Thanks
>for the heads-up.

To .sig, asap!


Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^ ..'KYU;*EVH[.FHF2W+#"\Z*5TI/ER 256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,

Re: line 16

am 16.10.2007 21:46:11 von jurgenex

Wade Ward wrote:
[...]
> die "Failed to retrieve message ids\n" unless @{$msg_ids_ref};
[...]
> q3) Why does perl.exe not like line 16? I've correceted this before
> but forget how. Thanks in advance.

Can't repro your problem.
C:\tmp>perl -c t.pl
t.pl syntax OK
What error message are you getting?

BTW: would have been nice to include the error message right away as well as
to point out which line is line 16.

jue

Re: line 16

am 17.10.2007 02:27:06 von merl the perl

"Jürgen Exner" wrote in message
news:7y8Ri.1556$tX1.1216@trndny05...
> Wade Ward wrote:
> [...]
>> die "Failed to retrieve message ids\n" unless @{$msg_ids_ref};
> [...]
>> q3) Why does perl.exe not like line 16? I've correceted this before
>> but forget how. Thanks in advance.
>
> Can't repro your problem.
> C:\tmp>perl -c t.pl
> t.pl syntax OK
> What error message are you getting?
>
> BTW: would have been nice to include the error message right away as well
> as to point out which line is line 16.
I got the upper hand on this one already. It was the use of the newnews
method that is unsupported by comcast.
--
wade ward
"Nicht verzagen, Bruder Grinde fragen."

Re: line 16

am 18.10.2007 05:34:30 von Joe Smith

Wade Ward wrote:

> Testing for return values is a bit more than my current perl game.

You should always test return values.
If you feel you are not competent enough to do that, then you should
hire someone else to do the programing for you.

Re: line 16

am 18.10.2007 05:50:53 von Joe Smith

Wade Ward wrote:

> I got the upper hand on this one already. It was the use of the newnews
> method that is unsupported by comcast.

Didn't we tell you that back on 7/6/2007?

Re: line 16

am 18.10.2007 07:06:12 von merl the perl

"Joe Smith" wrote in message
news:ZcqdnSmsvbD9SYvanZ2dnUVZ_rrinZ2d@comcast.com...
> Wade Ward wrote:
>
>> Testing for return values is a bit more than my current perl game.
>
> You should always test return values.
> If you feel you are not competent enough to do that, then you should
> hire someone else to do the programing for you.
2 interpersonal normative statements, which are philosophically
unintelligible.

How do I test for return values?
--
wade ward
"Nicht verzagen, Bruder Grinde fragen."

Re: line 16

am 18.10.2007 07:07:55 von merl the perl

"Joe Smith" wrote in message
news:ZcqdnSisvbClRYvanZ2dnUVZ_rrinZ2d@comcast.com...
> Wade Ward wrote:
>
>> I got the upper hand on this one already. It was the use of the newnews
>> method that is unsupported by comcast.
>
> Didn't we tell you that back on 7/6/2007?
Yeah. I relocated in the meantime, so I packed up the whole show, and
forgot some of the things I had learned.

The cure was xover.
--
wade ward
"Nicht verzagen, Bruder Grinde fragen."

Re: line 16

am 18.10.2007 11:54:04 von Michele Dondi

On Wed, 17 Oct 2007 22:06:12 -0700, "Wade Ward"
wrote:

>>> Testing for return values is a bit more than my current perl game.
>>
>> You should always test return values.
>> If you feel you are not competent enough to do that, then you should
>> hire someone else to do the programing for you.
>2 interpersonal normative statements, which are philosophically
>unintelligible.
>
>How do I test for return values?

Too many ways. A common one is the

or do_something; # idiom

But of course you can use an if-else construct instead.


Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^ ..'KYU;*EVH[.FHF2W+#"\Z*5TI/ER 256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,

Re: line 16

am 18.10.2007 21:05:52 von merl the perl

"Michele Dondi" wrote in message
news:i7beh3hgvvpc54pksto6mcfbvtaq3sbij9@4ax.com...
> On Wed, 17 Oct 2007 22:06:12 -0700, "Wade Ward"
> wrote:
>
>>>> Testing for return values is a bit more than my current perl game.
>>>
>>> You should always test return values.
>>> If you feel you are not competent enough to do that, then you should
>>> hire someone else to do the programing for you.
>>2 interpersonal normative statements, which are philosophically
>>unintelligible.
>>
>>How do I test for return values?
>
> Too many ways. A common one is the
TMTOWTDI? tim-toady

> or do_something; # idiom
>
> But of course you can use an if-else construct instead.
>
I tried to find something in my reading last night, but there is *nothing*
on this in the Camel book, not under value or return, nor in functions.
--
wade ward
"Nicht verzagen, Bruder Grinde fragen."

Re: line 16

am 18.10.2007 22:09:05 von Michele Dondi

On Thu, 18 Oct 2007 12:05:52 -0700, "Wade Ward"
wrote:

>> But of course you can use an if-else construct instead.
>>
>I tried to find something in my reading last night, but there is *nothing*
>on this in the Camel book, not under value or return, nor in functions.

But it is far too wide a subject to be covered at a single point:
nothin exhotic about it. You just have some functions that may return
a value, and you want to check that. The most common case is:

open my $fh, '<', $file or die "Can't open '$file': $!\n";


Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^ ..'KYU;*EVH[.FHF2W+#"\Z*5TI/ER 256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,

Re: line 16

am 19.10.2007 01:01:28 von merl the perl

"Michele Dondi" wrote in message
news:q6ffh39jtpeir5undpa2mt23i3a3rv6rs6@4ax.com...
> On Thu, 18 Oct 2007 12:05:52 -0700, "Wade Ward"
> wrote:
>
>>> But of course you can use an if-else construct instead.
>>>
>>I tried to find something in my reading last night, but there is *nothing*
>>on this in the Camel book, not under value or return, nor in functions.
>
> But it is far too wide a subject to be covered at a single point:
> nothin exhotic about it. You just have some functions that may return
> a value, and you want to check that. The most common case is:
>
> open my $fh, '<', $file or die "Can't open '$file': $!\n";

I've died more times than I can count, so if that rates as checking the
return, then I've got that base covered.
--
wade ward
"Nicht verzagen, Bruder Grinde fragen."