Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hello,
I'm perplexed on this line, from the camel book, second edition, pg 540:
Similarily, set default values with:
$pi || = 3;
Which, doesn't really makes sense, and doesn't well, work anyways, am I missing something?
I personally am trying to shorten this piece of code:
unless($list_info{subscribed_message} ne "" || exists $list_info{subsc +ribed_message}) {$list_info{subscribed_message} = $subscribed_message}
Which is trying to set a default variable to something (a copy of a tied hash) that may not be there. There's about 10 of those nasty lines, so a for loop looks inticing.
Any help will be apreciated :)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Error in Camel Book Ver2?
by redcloud (Parson) on Dec 21, 2000 at 10:14 UTC | |
Re: Error in Camel Book Ver2?
by chipmunk (Parson) on Dec 21, 2000 at 10:23 UTC | |
by Anonymous Monk on Dec 21, 2000 at 11:19 UTC | |
by merlyn (Sage) on Dec 21, 2000 at 11:51 UTC | |
by marius (Hermit) on Dec 21, 2000 at 21:36 UTC | |
by ichimunki (Priest) on Dec 21, 2000 at 21:35 UTC | |
by myocom (Deacon) on Dec 21, 2000 at 11:56 UTC | |
by skazat (Chaplain) on Dec 21, 2000 at 13:24 UTC | |
Re: Error in Camel Book Ver2?
by Dominus (Parson) on Dec 22, 2000 at 08:31 UTC |