Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi all,
Noobie here, need help :(.
Here is a code snippet:
foreach $ttt (@syshosts) { $cname = Host::get_cname($ttt); if( $cname =~ m/(Workstation|AnalogGateway)/ ) { push @serialOperations, $ttt; } }
Basically, if I have a Workstation or AnalogGateway I want to pust the contents of $ttt onto serialOperations. But I keep getting the error message:
Invalid value for shared scalar at r21shutdown_parallel.pl line 131, < +FILE> line 15.
serialOperations is shared.
Any help is greatly appreciated.
Thanks
20051103 Janitored by Corion: Added formatting
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: using push
by ikegami (Patriarch) on Nov 03, 2005 at 21:34 UTC | |
Re: using push
by GrandFather (Saint) on Nov 03, 2005 at 21:27 UTC | |
Re: using push
by Roy Johnson (Monsignor) on Nov 03, 2005 at 21:28 UTC | |
Re: using push
by Fletch (Bishop) on Nov 03, 2005 at 21:31 UTC | |
Re: using push
by hubb0r (Pilgrim) on Nov 04, 2005 at 05:45 UTC |