On Dec 10, 12:57 pm, shawnhco...@gmail.com (Shawn H Corey) wrote:
> C.DeRykus wrote:
> > On Dec 8, 1:57 am, dery...@gmail.com (C.DeRykus) wrote:
> >> On Dec 8, 12:08 am, an...@melerit.se (Anders Hartman) wrote:
>
> >>> ...
>
> >> ...
> >> Also, in this case, I'd write the eval for compile-time and
C.DeRykus wrote:
On Dec 8, 1:57 am, dery...@gmail.com (C.DeRykus) wrote:
On Dec 8, 12:08 am, an...@melerit.se (Anders Hartman) wrote:
Also, in this case, I'd write the eval for compile-time and check
for errors:
eval { asub() };
die $@ if $@;
No, sorry, that's a "useless use of
At 11:43 AM -0800 12/9/09, cerr wrote:
Hi There,
I use below code to make sure i have only one instance of my script
running at a time. But weirdly enough i sometimes seem to have running
two instances. This script is getting called on a regular basis by a
cron job and may take a long time (30+m
> "SHC" == Shawn H Corey writes:
SHC> Uri Guttman wrote:
>>> "SHC" == Shawn H Corey writes:
SHC> Call it paranoid defensive programming. ;)
>>
>> overly paranoid imo. but that doesn't mean the bugs aren't out to get
>> ya! :)
SHC> Just because you're not paranoid doesn't
Uri Guttman wrote:
>> "SHC" == Shawn H Corey writes:
> SHC> Call it paranoid defensive programming. ;)
>
> overly paranoid imo. but that doesn't mean the bugs aren't out to get
> ya! :)
Just because you're not paranoid doesn't mean computers don't hate me.
--
Just my 0.0002 million
> "SHC" == Shawn H Corey writes:
SHC> Uri Guttman wrote:
>>> "SHC" == Shawn H Corey writes:
>>
SHC> Uri Guttman wrote:
>> >> why the || '' ??
>> >>
>> >> the help sub doesn't seem to exit/die
>>
SHC> Not proven; you cannot assume this.
>>
SHC> One school of thou
Uri Guttman wrote:
>> "SHC" == Shawn H Corey writes:
>
> SHC> Uri Guttman wrote:
> >> why the || '' ??
> >>
> >> the help sub doesn't seem to exit/die
>
> SHC> Not proven; you cannot assume this.
>
> SHC> One school of thought about programming is that all functions must have
>
> "SHC" == Shawn H Corey writes:
SHC> Uri Guttman wrote:
>> why the || '' ??
>>
>> the help sub doesn't seem to exit/die
SHC> Not proven; you cannot assume this.
SHC> One school of thought about programming is that all functions must have
SHC> only one return and all programs
Shawn H Corey wrote:
> Uri Guttman wrote:
>> why the || '' ??
>>
>> the help sub doesn't seem to exit/die
>
> Not proven; you cannot assume this.
>
> One school of thought about programming is that all functions must have
> only one return and all programs must have only one exit. Therefore,
> h
C.DeRykus wrote:
> On Dec 8, 1:57 am, dery...@gmail.com (C.DeRykus) wrote:
>> On Dec 8, 12:08 am, an...@melerit.se (Anders Hartman) wrote:
>>
>>> ...
>
>> ...
>> Also, in this case, I'd write the eval for compile-time and check
>> for errors:
>>
>> eval { asub() };
>> die $@ if $@;
>>
>
On Dec 8, 1:57 am, dery...@gmail.com (C.DeRykus) wrote:
> On Dec 8, 12:08 am, an...@melerit.se (Anders Hartman) wrote:
>
>> ...
> ...
> Also, in this case, I'd write the eval for compile-time and check
> for errors:
>
> eval { asub() };
> die $@ if $@;
>
No, sorry, that's a "useless us
Uri Guttman wrote:
> why the || '' ??
>
> the help sub doesn't seem to exit/die
Not proven; you cannot assume this.
One school of thought about programming is that all functions must have
only one return and all programs must have only one exit. Therefore,
help() may return or it may not.
Unti
>I need to pass an command-line arg that is a string which contains the '@'.
Is there any way to do this and also 'tell' Perl not to interpret this as
other than a '@' character?
>
>Thx.
Hi,
Perl would not do anything with command-line arguments unless you tell it
otherwise. Check if you are
> "SHC" == Shawn H Corey writes:
SHC> John W. Krahn wrote:
>> Shawn H Corey wrote:
>>> Steve Bertrand wrote:
You can replace them all with this:
my $station = $channels{ $opt_s };
>>>
>>> my $station = $channels{ $opt_s } || help();
>>
>> my $station = $c
Shawn H Corey wrote:
> John W. Krahn wrote:
>> Shawn H Corey wrote:
>>> Steve Bertrand wrote:
You can replace them all with this:
my $station = $channels{ $opt_s };
>>> my $station = $channels{ $opt_s } || help();
>> my $station = $channels{ $opt_s } or help();
>
>
> my $station =
John W. Krahn wrote:
> Shawn H Corey wrote:
>> Steve Bertrand wrote:
>>> You can replace them all with this:
>>>
>>> my $station = $channels{ $opt_s };
>>
>> my $station = $channels{ $opt_s } || help();
>
> my $station = $channels{ $opt_s } or help();
my $station = $channels{ $opt_s } || '' or h
Shawn H Corey wrote:
Steve Bertrand wrote:
You can replace them all with this:
my $station = $channels{ $opt_s };
my $station = $channels{ $opt_s } || help();
my $station = $channels{ $opt_s } or help();
Or:
( my $station = $channels{ $opt_s } ) || help();
John
--
The programmer is figh
Hi There,
I use below code to make sure i have only one instance of my script
running at a time. But weirdly enough i sometimes seem to have running
two instances. This script is getting called on a regular basis by a
cron job and may take a long time (30+min)to complete but still...I
can't figure
Steve Bertrand wrote:
> You can replace them all with this:
>
> my $station = $channels{ $opt_s };
my $station = $channels{ $opt_s } || help();
Make sure help() ends with `return;` or `exit();`
--
Just my 0.0002 million dollars worth,
Shawn
Programming is as much about organization and
Steve Bertrand wrote:
> trapd...@trapd00r.se wrote:
>> On 08/12/09 23:15 -0500, Steve Bertrand wrote:
>>> To the OP, without code, it makes it difficult to tell what you are
>>> after.
>> Sorry, tired... :) Here's the code
>
> You didn't cc the list ;)
>
>> #!/usr/bin/perl
>> use strict;
>> use
trapd...@trapd00r.se wrote:
> On 08/12/09 23:15 -0500, Steve Bertrand wrote:
>> To the OP, without code, it makes it difficult to tell what you are
>> after.
>
> Sorry, tired... :) Here's the code
You didn't cc the list ;)
> #!/usr/bin/perl
> use strict;
> use warnings;
Nice.
> use diagnostic
2009/12/9 Anush :
> Hi all, i have a problem with the break statement, in my program the
> break is not working, that is the control would not breaks from the
> loop. Please help me.
Can you give an example of your problem? What is your code? What did
it do? What did you expect it to do?
Perhaps
Hi all, i have a problem with the break statement, in my program the
break is not working, that is the control would not breaks from the
loop. Please help me.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
2009/12/10 John W. Krahn :
> Noah wrote:
>>
>> Hi there,
>
> Hello,
>
>> I am hoping to figure out the best Way to write something. I have two
>> arrays @previous_hostnames and @hostnames.
>>
>> I want to figure out if there is at least one matching element in
>> @previous_hostnames that is found
24 matches
Mail list logo