Here is my code. Not mine, but clipped from net. And it is not working
#!/usr/bin/perl -w
use CGI::Carp qw(fatalsToBrowser);
use strict;
use warnings;
use CGI qw(:all);
use IO::File;
use constant FILE => '*.*';
use constant FIND => '332';
IO::File->input_record_separator(FIND);
my $fh =...
The more I study this Perl more I confused...and get Server error 500.
I tried to search solution from internet but cant find any or if found some did not understand it.
problem is this:
I need a script which search with given string all files within specific directory and and print all those...
rhasrh, your code works fine. I tried to make modifications myself, but got always 500 Server Internal Error. But now everything is working just what I wanted.
Maybe it is now good time to download good Perl documentation.
KevinADC, your code worked also but link it made pointed to the root...
This forum is superb!
ABove code nearly solved my problem. I had to use my script in upper directory, so had to change
my @list = (<*.*>); to my @list = (<NAME/*.*>);
now result is NAME/07122008.htm and that script can not do anything with it.
If I move 07122008.htm in to upper...
Thank you. That just what I needed. But it arise new questions...
Now ir brings files with names ie. 06122008.htm, 07122008.htm etc.
Can I make a filter which take in that name, rip off extension and put dots into right places so that 07122008.htm displays as 07.12.2008 ???
Thank you forehand...
I have this little script which prints all files from directory as links.
How can I modify it to print in 2 or 3 columns?
Kari
#!/usr/bin/perl
use CGI::Carp qw(fatalsToBrowser);
use strict;
use warnings;
use CGI qw(:all);
print header(),
ul( map li( a( {href => $_ }, $_ )), <*.*> )
;
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.