Hi all,
On Tue, 05 Jun 2012 10:15:36 -0700
John W. Krahn jwkr...@shaw.ca wrote:
[ Please do not top-post your replies. Please remove non-relevant text
from your reply before posting. TIA ]
don't insult and dismiss out of hand the findings of those who take the
time to help you.
If I
Hello John,
On Mon, 04 Jun 2012 14:19:27 -0700
John W. Krahn jwkr...@shaw.ca wrote:
Chris Stinemetz wrote:
I have a subroutine that I want to return 1 only if the value of
%{$href-{$_[0]}} is equal to 'ND' for the whole 24 occurences.
One way to do it:
sub site_offAir {
return
Shlomi Fish wrote:
On Mon, 04 Jun 2012 14:19:27 -0700
John W. Krahnjwkr...@shaw.ca wrote:
Chris Stinemetz wrote:
I have a subroutine that I want to return 1 only if the value of
%{$href-{$_[0]}} is equal to 'ND' for the whole 24 occurences.
One way to do it:
sub site_offAir {
ProTip: If you're going to ask for help, don't insult and dismiss out of hand
the findings of those who take the time to help you.
-Original Message-
From: John W. Krahn [mailto:jwkr...@shaw.ca]
Sent: Tuesday, June 05, 2012 2:18 AM
To: Perl Beginners
Subject: Re: subroutine returning
for help, don't insult and dismiss out of hand
the findings of those who take the time to help you.
-Original Message-
From: John W. Krahn [mailto:jwkr...@shaw.ca]
Sent: Tuesday, June 05, 2012 2:18 AM
To: Perl Beginners
Subject: Re: subroutine returning data
Shlomi Fish wrote
[ Please do not top-post your replies. Please remove non-relevant text
from your reply before posting. TIA ]
Jack Maney wrote:
ProTip:
The top two results from Google state:
PROTIP | Know Your Meme
About PROTIP is a term often used in forums and comments to preface snarky,
obvious,
I have a subroutine that I want to return 1 only if the value of
%{$href-{$_[0]}} is equal to 'ND' for the whole 24 occurences.
Any suggestions is greatly appreciated.
Thank you,
Chris
sub site_offAir {
for (values %{$href-{$_[0]}}) {
return 1 if $_ eq 'ND'; #need to test all values are
On Mon, Jun 04, 2012 at 11:30:30AM -0500, Chris Stinemetz wrote:
I have a subroutine that I want to return 1 only if the value of
%{$href-{$_[0]}} is equal to 'ND' for the whole 24 occurences.
Any suggestions is greatly appreciated.
Thank you,
Chris
sub site_offAir {
for (values
On Jun 4, 2012, at 11:30 AM, Chris Stinemetz wrote:
I have a subroutine that I want to return 1 only if the value of
%{$href-{$_[0]}} is equal to 'ND' for the whole 24 occurences.
Any suggestions is greatly appreciated.
Chris, I don't know how to read your hash directly (hash of hashes?)
On 12-06-04 12:30 PM, Chris Stinemetz wrote:
I have a subroutine that I want to return 1 only if the value of
%{$href-{$_[0]}} is equal to 'ND' for the whole 24 occurences.
Any suggestions is greatly appreciated.
Thank you,
Chris
sub site_offAir {
for (values %{$href-{$_[0]}}) {
Thanks Shawn!
The values %{$href-{$_[0]}} code is pretty ugly but I get it now. And it
make sense to break out of the loop as soon as you don't pass the test.
Kindest Regards,
Bill Stephenson
On Jun 4, 2012, at 12:49 PM, Shawn H Corey wrote:
On 12-06-04 12:30 PM, Chris Stinemetz wrote:
On 12-06-04 02:01 PM, Bill Stephenson wrote:
The values %{$href-{$_[0]}} code is pretty ugly but I get it now. And it
make sense to break out of the loop as soon as you don't pass the test.
sub site_offAir {
my $site_id = shift @_;
for my $activity_code ( values %{
Thank you everyone. Your help has been very helpful..
Chris
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Chris Stinemetz wrote:
I have a subroutine that I want to return 1 only if the value of
%{$href-{$_[0]}} is equal to 'ND' for the whole 24 occurences.
One way to do it:
sub site_offAir {
return values %{ $href-{ $_[ 0 ] } } == grep( $_ eq 'ND', values
%{ $href-{ $_[ 0 ] } } ) ? 1 : '';
14 matches
Mail list logo