SPUG: RE: Simple program - gone wrong
Sweethomes
sweetsue at sweethomes.com
Mon Jul 8 13:44:57 CDT 2002
Ok, this almost works. The numbering doesn't seem right. What it's doing
is listing all files as it should but the first set is all marked with "0",
then it repeats the file listing each with "1" in front of it. This repeats
to "100" at which point it stops. I need it to number each file like so:
1 | index.html
2 | black_line.gif
3 | counter.php
4 | counter.txt
5 | formmail.php
6 | logo.gif
7 | favicon.ico
8 | help.html
9 | main.html
etc. From here I can figure out how to filter out the .txt and the .gif
etal leaving the .html files only.
Thanks - you guys are great!
Susanne
-----Original Message-----
From: owner-spug-list at pm.org [mailto:owner-spug-list at pm.org]On Behalf Of
Chris Wilkes
Sent: Monday, July 08, 2002 11:02 AM
To: spug-list at pm.org
Subject: Re: SPUG: RE: Simple program - gone wrong
On Mon, Jul 08, 2002 at 10:47:38AM -0700, Chris Wilkes wrote:
> for my $num (0..100) {
> foreach (@files) {
> print RDIR, "$num | $_\n";
> }
> }
Arg there shouldn't be a comma in there. Should just be:
print RDIR "$num | $_\n";
Chris
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org
More information about the spug-list
mailing list