i'm unsure about the first question, but your answer to the 2nd one, is, if
you are using more than 1 script in your program, and you require() it, the
script that's require()'d must have 1; as the last line. this way, perl
knows it's the end of the file, and not to read any further. it returns a
"true value" to perl. it also claims to perl that the script is complete.

dan

"Mystik Gotan" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hiya,
>
> I got some basic Perl questions. Hope you don't mind answerring them?
>
> 1) What is the use of just putting $var; on 1 line? Example:
> #!usr/bin/perl -wT
>
> # some code
> $var;
>
> Does this technique rescopes the variable?
> 2) Why is exit() or 1; used on the LAST line. I understand it being on
some
> line when you need to exit. Also, exit() won't be too hard. I think (and I
> think I am possibly right), it exits because there are still some
operations
> during. But why 1; on the end of the line? Does it wait for a true value
of
> the whole script?
>
> Think I've kinda missed these usements on Perl ;-)
>
> Thanks for your help, already.
>
>
>
> _________________________________________________________________
> Direct chatten met je vrienden met MSN Messenger  http://messenger.msn.nl
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to