[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Omaha.pm] strange file exists behavior
Title: Re: strange file exists behavior
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@omares-etl:/datamining/usw_log> ls /datamining/usw_log/ban*trans-20080813*
/datamining/usw_log/banana_slicer.pl-trans-20080813.gz