in reply to
Zipped problem !
What is
if(($file1 eq $file2) =~(/.zip/i)){ ... }
supposed to do?
($file1 eq $file2)
returns a boolean which is then matched against a regexp?
Comment on
Re: Zipped problem !
Select
or
Download
Code
Replies are listed 'Best First'.
Re^2: Zipped problem !
by
prad_intel
(Monk)
on Feb 04, 2005 at 07:54 UTC
checks wether the file1 and file 2 are have the same file name and further check wether it has a .zip extension..
Sorry if its a bad logic..
[reply]
Re^3: Zipped problem !
by
chb
(Deacon)
on Feb 04, 2005 at 08:05 UTC
($file1 eq $file2)
will evaluate to
1
(if the filenames are indeed equal) or the empty string (if the filenames differ). None of these values will ever match
/.zip/i
. (BTW you have to quote the dot in the regexp if you want to match a literal dot).
[reply]
[d/l]
[select]
In Section
Seekers of Perl Wisdom