[Omaha.pm] strange file exists behavior
Jay Hannah
jhannah at omnihotels.com
Thu Aug 14 06:20:14 PDT 2008
I don¹t think the file test operators do globbing. You can use glob()
instead if you want.
if (! glob(³$target_path/$filename")) {
next;
}
perldoc f glob
HTH,
j
On 8/14/08 7:54 AM, "Sean Baker" wrote:
> Does anyone have any clue why my ³-e² check is saying file does not exist and
> dropping me into the ³next;² statement? It doesn¹t like asterisks? It works
> fine when I use the entire file name.
>
>
> main::(usw_response_by_min.pl:47): `scp lb1:$source_path/$filename
> $target_path`;
> DB<3> n
> main::(usw_response_by_min.pl:48): if (! -e "$target_path/$filename")
> {
> DB<3> n
> main::(usw_response_by_min.pl:49): next;
> DB<3> p "$target_path/$filename"
> /datamining/usw_log/ban*trans-20080813*
>
>
> pbaker at omares-etl:/datamining/usw_log> ls
> /datamining/usw_log/ban*trans-20080813*
> /datamining/usw_log/banana_slicer.pl-trans-20080813.gz
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/omaha-pm/attachments/20080814/7e0f69a4/attachment.html>
More information about the Omaha-pm
mailing list