use the -e operator...

C:\>perl -e "print qq(file exists!) if -e 'c:\autoexec.bat'"

Output:

file exists!


perldoc -f -e will tell you more.

Matt

--- Arran4 <[EMAIL PROTECTED]> wrote:
> How do i find out if a file exists in ActivePerl?
> 
> 
> From: Arran
> =======
> It is obvious:
>   The only program that parses Perl is perl, and to really be
>   Perl you also have to be perl.  The easiest way to turn
>   Perl code into an executable is to embed the perl interpreter!
> 
> song: "If you are sexy and you know it clap your hands"
> Me: im going to go have to sit this one out...
> 
> If builders built buildings the way programmers wrote programs, then the
> first woodpecker to come along would destroy civilization.
> 
> We are the out casts of society, but when they relise its the out casts that
> create society, we will fall.
> 
> Everything I know about thermal expansion I learnt from Neon Genesis
> Evangelion!
> 
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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

Reply via email to