/passwd')
{
printf "File exist !\n";
} else {
printf "File not exist !\n";
}
return $f1;
}
escMe("/etc/passwd");
Output:
Files are NOT same '/etc/passwd'/etc/passwd
File not exist '/etc/passwd' !
File not exist /etc/passwd !
File not exis
");
Output:
lab# perl test3.pl
Files are same '/etc/passwd''/etc/passwd'
File not exist '/etc/passwd' !
File not exist '/etc/passwd' !
File not exist '/etc/passwd' !
File exist '/etc/passwd' !
W dniu 2016-11-10 11:52:46 użytkowni
Hi,
how can I check if file exist or not ?
Here's a short test/example:
if (-e '/etc/passwd')
{
printf "File exist !\n";
} else {
printf "File not exist !\n";
}
That works great !
but next a short test/example:
my $f1 = '/etc/passwd';
if (-e $f1)
{
printf "File exist !\n";
} else {
prin