Home: Perl Programming Help: Beginner:
"print" with "die" - What's wrong ??



moroshko
Novice

Jun 21, 2008, 1:24 PM


Views: 1275
"print" with "die" - What's wrong ??

Can anyone please explain me why the following program doesn't prints "123" ?

How can I fix it so that "die"'s message will be printed after "print"'s message ?

Thanks !!

#!/usr/bin/perl
use warnings;
use strict;

print 1;
print 2;
die "3\n";


molent
New User

Jun 21, 2008, 3:13 PM


Views: 1268
Re: [moroshko] "print" with "die" - What's wrong ??


Code
#!/usr/bin/perl 
use warnings;
use strict;
use English;

$OUTPUT_AUTOFLUSH = 1;

print 1;
print 2;
die "3\n";



moroshko
Novice

Jun 21, 2008, 10:59 PM


Views: 1263
Re: [molent] "print" with "die" - What's wrong ??

Thank you !! Smile