in reply to Re: Merge 2 lines in 1 die statement
in thread Die statement with text & formatting of the user
In this snippet exit doesnt end the perl cgi script as i expect it to do but instead it exits the if structure.if ($select->rows) { print(h1( {class=>'cyan'}, "Error occured $row->{username}! Script +have to die" )); exit(0); }
In this one which i preferes to use the script does die in general because it isnt in a block structure to just exit but infortunately it dies without first printing what it has to print....print(h1( {class=>'cyan'}, "Error occured $row->{username}! Script hav +e to die" )), exit(0) if $select->rows;
die(h1( {class=>'cyan'}, "Error occured $row->{username}! Script have +to die" ));
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Merge 2 lines in 1 die statement
by shmem (Chancellor) on Apr 28, 2007 at 09:30 UTC | |
by Nik (Initiate) on Apr 28, 2007 at 09:39 UTC | |
by shmem (Chancellor) on Apr 28, 2007 at 11:00 UTC | |
by ikegami (Patriarch) on Apr 28, 2007 at 15:44 UTC | |
by Nik (Initiate) on Apr 28, 2007 at 11:33 UTC | |
by shmem (Chancellor) on Apr 28, 2007 at 12:23 UTC | |
|