Home  |  Linux  | Mysql  | PHP  | XML
From:Robert Roggenbuck Date:Wed Mar 17 12:11:22 2010
Subject:Re: 2 off in array count and index


jbl schrieb:
> I am reading a directory and creating an array of .png file names. I
> know for a fact that there are 1025 png files in the folder

[snip]

> my @files = grep !/^\.png/, readdir FILENAMES;

Try it better positive:

my @files = grep /\.png$/, readdir FILENAMES;

;-)

Greetings

Robert

Navigate in group perl.beginners.cgi at sever nntp.perl.org
Previous Next


Your recent visits
Re: Getting forward slashes and hyphins past the taint check
Perl CGI advise/feedback please ...
Re: CGI ap on NetworkSolutions host
how to add support of Msql and CGI in Apache
Logout from Apache



  
© No Copyright
You are free to use Anything, but please consult your advocate before doing so as this website
also list content from other sources which may be copyrighted.
Site Maintained by Zareef Ahmed
Powered By PHP Consultants