SimplySimple has asked for the wisdom of the Perl Monks concerning the following question:
I'm a beginner to Perl, and I have a question about assigning values to the variable $_. I'm trying to get "Test A" as the output and I get no output instead. And here is the slice of code I want to fix.
"Test A"or"Test B"; print;
May someone help me to modify the code to get the expected result? Thanks a lot.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Implicit assignment to $_
by blue_cowdawg (Monsignor) on Feb 26, 2013 at 16:10 UTC | |
by tobyink (Canon) on Feb 26, 2013 at 17:01 UTC | |
by blue_cowdawg (Monsignor) on Feb 26, 2013 at 18:40 UTC | |
by tobyink (Canon) on Feb 26, 2013 at 20:21 UTC | |
by hippo (Archbishop) on Feb 26, 2013 at 22:40 UTC | |
by McA (Priest) on Feb 26, 2013 at 16:19 UTC | |
|
Re: Implicit assignment to $_
by grondilu (Friar) on Feb 26, 2013 at 16:25 UTC | |
|
Re: Implicit assignment to $_
by arnaud99 (Beadle) on Feb 26, 2013 at 16:08 UTC | |
|
Re: Implicit assignment to $_
by tobyink (Canon) on Feb 26, 2013 at 16:59 UTC | |
|
Re: Implicit assignment to $_
by pvaldes (Chaplain) on Feb 26, 2013 at 17:05 UTC |