List Info

Thread: -e problem




-e problem
user name
2006-12-15 16:22:16
On Dec 15, 2006, at 10:41 AM, Lou Hernsen wrote:

> I use the -e to check to see if a file is present
>
>   if (-e "$Pics/$Game.jpg")
>   {
>    }
>
> Question
> I can get it to work looking for .pl and .gif but not
.jpg
>
> I have checked all the directorie vars and even did
this
>
>   print qq|<img border=0
src="$Pics/Camera.gif"
width="$Game"
> height="$Game"><BR>|;
>   print qq|<BR>|;
>   print qq|<a target="$Game"
href="$Pics/$Game.jpg">|;
>   print qq|<img border=0
src="$Pics/Camera.gif"
width="$Game"
> height="$Game"><BR>|;
>   print qq|</a>|;
>   print qq|<BR>|;
>   if (-e "$Pics/$Game.jpg")
>   {
>       print qq|<img border=0
src="$Pics/Camera.gif" width="$Game 
> "
> height="$Game"><BR>|;
>    }
>
> I get the first two images but not the last one.. so I
know i have  
> the dirs
> correct
> are .jpg's not -e able???
>
> yeah.. i'm nonprofessional hobbiest .... my style
suck... can  
> someone answer
> the question, please?
> Lou

Without knowing your platform or seeing the $Pics directory
contents,  
I'd venture a guess that your file system is case-sensitive
and the  
extension is ".JPG" (or possibly ".jpeg"
or anything else that  
doesn't match).

Care to give us a bit more to go on?  There's no reason that
-e would  
exclude files based on their extension.

-Rob

Rob Biedenharn		http://agileconsultingl
lc.com
RobAgileConsultingLLC.com





Unsubscribing info is here: h
ttp://help.yahoo.com/help/us/groups/groups-32.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://g
roups.yahoo.com/group/perl-beginner/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http
://groups.yahoo.com/group/perl-beginner/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:perl-beginner-digest@yahoogroups.com 
    mailto:perl-beginner-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    perl-beginner-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.c
om/info/terms/
 
-e problem
user name
2006-12-15 16:59:43
On 12/15/06 11:22 AM, Rob Biedenharn at RobAgileConsultingLLC.com wrote:

> 
> Without knowing your platform or seeing the $Pics
directory contents,
> I'd venture a guess that your file system is
case-sensitive and the
> extension is ".JPG" (or possibly
".jpeg" or anything else that
> doesn't match).
> 
> Care to give us a bit more to go on?  There's no reason
that -e would
> exclude files based on their extension.

OR ...

It seems like the code is checking for the existence of a
file, in order to
then build an IMG link to that file.

It looks like the links and the code is working and as you
say it shouldn't
exclude .jpg

But if the end result is a browser page and that jpeg does
not conform to a
proper spec (for example if it is a CMYK jpeg) then the
browser just won't
display it.

That *looks* like a code -e problem, but actually it's a
jpeg file format
problem.





Unsubscribing info is here: h
ttp://help.yahoo.com/help/us/groups/groups-32.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://g
roups.yahoo.com/group/perl-beginner/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http
://groups.yahoo.com/group/perl-beginner/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:perl-beginner-digest@yahoogroups.com 
    mailto:perl-beginner-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    perl-beginner-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.c
om/info/terms/
 
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )