Re: here's an easy one

2003-09-21 Thread Cy Kurtz
Strangest thing. Nothing worked. I was calling the file from the command line(ala ./fillfile.pl). I tried it another way(perl fillfile.pl) and it took right off. My clumsy old script even worked once I made the suggestions Bryan recommended. Rob's script worked fine out of the box(once I start

Re: here's an easy one

2003-09-21 Thread Rob Dixon
Cy Kurtz wrote: > I hope it's an easy one for you. It's not quite easy enough for me. > > I want to harvest some files from a website. The files are in this > format: > > fooYYMMDD.ext, as in foo030901.ext for September 1st, 2003. > > To wget the first nine months

Re: here's an easy one

2003-09-21 Thread Bryan Harris
nth you need to reset the day back to 1. Doesn't wget do this for you? I'm not sure (I use curl), but I think you can type something like this: wget "http://basic.url/dir/foo030[1-9][0-3][1-9].ext"; Good luck. - B > I hope it's an easy one for you. It's not quite

Re: here's an easy one

2003-09-21 Thread awards
cleaner way you do $time = $month.$day; print OUTFILE "http://basic.url/dir/file03$time.ext,\n";; "Cy Kurtz" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I hope it's an easy one for you. It's not quite easy enough for me. > > I wan

here's an easy one

2003-09-21 Thread Cy Kurtz
I hope it's an easy one for you. It's not quite easy enough for me. I want to harvest some files from a website. The files are in this format: fooYYMMDD.ext, as in foo030901.ext for September 1st, 2003. To wget the first nine months of this daily file, I need a file that looks like t

Re: Easy one [getting "OCT" from localtime]

2002-10-27 Thread John W. Krahn
Jeff 'Japhy' Pinyan wrote: > > On Oct 27, John W. Krahn said: > > >> So what did "localtime[4]" (without parens) do? > > > >my $x = localtime[4]; > > > >Is the same as: > > > >my $x = localtime; > > > >Which assigns the scalar value of localtime to $x. The [4] part is > >ignored. > > No, it is

Re: Easy one [getting "OCT" from localtime]

2002-10-27 Thread Jeff 'japhy' Pinyan
On Oct 27, John W. Krahn said: >> So what did "localtime[4]" (without parens) do? > >my $x = localtime[4]; > >Is the same as: > >my $x = localtime; > >Which assigns the scalar value of localtime to $x. The [4] part is >ignored. No, it is not ignored. localtime() takes an argument -- a number of

Re: Easy one [getting "OCT" from localtime]

2002-10-27 Thread John W. Krahn
K Pfeiffer wrote: > > This lost me for a moment. I figured it out by trying... > > #!/usr/bin/perl > use warnings; > use strict; > # test "get uc month from localtime" > > my $month = qw(JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV > DEC)[(localtime)[4]]; > > print localtime,"\n"; > my $x = loca

Re: Easy one [getting "OCT" from localtime]

2002-10-27 Thread K Pfeiffer
John W. Krahn writes: > Jeff 'Japhy' Pinyan wrote: [...] > > my $month = (split ' ', uc localtime)[1]; > > > > localtime(), in scalar context, returns a string like > > > > "Fri Oct 25 10:30:23 2002" > > > > I'm uppercasing it, splitting it on whitespace, and getting the 2nd > > element ("OCT")

Re: Easy one

2002-10-25 Thread John W. Krahn
Jeff 'Japhy' Pinyan wrote: > > On Oct 25, [EMAIL PROTECTED] said: > > >my $month = system("date '+%b'"); > >$month = uc $month; > > Your problem is that you're misusing system(). system() does NOT return > output (see perldoc -f system). If you wanted to get output, you'd use > > my $month

RE: Easy one

2002-10-25 Thread Jeff 'japhy' Pinyan
On Oct 25, [EMAIL PROTECTED] said: >my $month = system("date '+%b'"); >$month = uc $month; Your problem is that you're misusing system(). system() does NOT return output (see perldoc -f system). If you wanted to get output, you'd use my $month = `date '+%b'`; but there's NO reason to use a

RE: Easy one

2002-10-25 Thread jonathan . musto
ase notify us by telephone or email (to the numbers or address above) immediately. -Original Message- From: Jeff 'japhy' Pinyan [mailto:japhy@;perlmonk.org] Sent: Friday, October 25, 2002 14:56 To: Musto,J,Jonathan,IVYD3 C Cc: [EMAIL PROTECTED] Subject: Re: Easy one

Re: Easy one

2002-10-25 Thread Jeff 'japhy' Pinyan
On Oct 25, [EMAIL PROTECTED] said: >How do a convert a string $string into uppercase?? perldoc -f uc $big = uc $little; -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ ** Look for "Regu

Easy one

2002-10-25 Thread jonathan . musto
How do a convert a string $string into uppercase?? Jonathan Musto BT Ignite Solutions Telephone - 0113 237 3277 Fax - 0113 244 1413 E-mail - [EMAIL PROTECTED] http://www.technet.bt.com/sit/public British Telecommunicat

RE: Easy one...

2001-11-09 Thread Gibbs Tanton - tgibbs
chomp( $input = ); -Original Message- From: A. Rivera To: [EMAIL PROTECTED] Sent: 11/9/2001 6:06 PM Subject: Easy one... I've got a simple question.. How do I do this in one line... $input=; chomp($input); Thanks! Agustin Rivera -- To unsubscribe, e-mail: [EMAIL PROTECTED

Easy one...

2001-11-09 Thread A. Rivera
I've got a simple question.. How do I do this in one line... $input=; chomp($input); Thanks! Agustin Rivera -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]