in reply to Printing two variables in the same line
Also, you do not need to put a trailing semicolon at the end of your else block. All this does is create an empty statement that does nothing.if ($student = "") { print "Cannot find that student, try again\n"; } else { print "$_ has a" . $student . "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Printing two variables in the same line
by JediWizard (Deacon) on Oct 07, 2004 at 20:53 UTC | |
by The_Rabbit (Acolyte) on Oct 07, 2004 at 20:58 UTC | |
by Smylers (Pilgrim) on Oct 07, 2004 at 21:18 UTC | |
by JediWizard (Deacon) on Oct 07, 2004 at 21:17 UTC |