LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   $! (https://www.linuxquestions.org/questions/linux-newbie-8/%24-4175421657/)

zahheb 08-12-2012 12:34 AM

$!
 
shoudnt there be $! instead of $: at the end of die ??.....
die "Could not open database: $:"


because die sends this message to the default variable $!......

thanks....i just started out with perl so have this doubt..

chrism01 08-12-2012 04:30 PM

If you mean Perl, then its your choice. I always specify it so that I get the underlying error msg.
If that's a quote from somebody's code, it's probably a typo.
http://perldoc.perl.org/
http://www.perlmonks.org/?node=Tutorials

zahheb 08-12-2012 10:15 PM

yes but should we use $! or $:
 
Quote:

Originally Posted by chrism01 (Post 4752602)
If you mean Perl, then its your choice. I always specify it so that I get the underlying error msg.
If that's a quote from somebody's code, it's probably a typo.
http://perldoc.perl.org/
http://www.perlmonks.org/?node=Tutorials

.... whats the difference ??


All times are GMT -5. The time now is 07:25 AM.