RE: newbie help for podcast script [with attach]

2005-07-31 Thread Charles K. Clarkson
[EMAIL PROTECTED] wrote: : This is basically my 1st perl script. : : It's a podcast download app. I don't know the etiquette for : attaching files, but I have attached a <100 line perl file. : : It seems that it fails if there is only 1 podcast for a feed : with: : : fet

Re: newbie help for podcast script [with attach]

2005-07-31 Thread alexeijh
On Sat, 2005-07-30 at 20:15 +1000, [EMAIL PROTECTED] wrote: > On Fri, 2005-07-29 at 19:03 -0700, John W. Krahn wrote: > > > You are trying to call the get() method on the $feed object. Read the > > documentation for the correct syntax for XML::Simple::XMLin(). > > > > perldoc XML::Simple > > >

Re: newbie help for podcast script [with attach]

2005-07-31 Thread John Doe
[...] > The script works fine for a normal pod feed. It only fails when the feed > only has one channel->item. > > Is line 65 OK? > > "foreach my $item (@{$data->{channel}->{item}}) {" > > all I want to do is step through one-by-one each item. Does that code > work properly if there is only one ite

Re: newbie help for podcast script [with attach]

2005-07-30 Thread alexeijh
On Fri, 2005-07-29 at 19:03 -0700, John W. Krahn wrote: > You are trying to call the get() method on the $feed object. Read the > documentation for the correct syntax for XML::Simple::XMLin(). > > perldoc XML::Simple > > > As to the warning message: > > perldoc perldiag > [snip] >Odd

Re: newbie help for podcast script [with attach]

2005-07-29 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > *** SORRY, forgot to attach file. *** > > Hi, Hello, > This is basically my 1st perl script. > > It's a podcast download app. I don't now the etiquette for attaching > files, but I have attached a <100 line perl file. > > It seems that it fails if there is only 1 pod

Re: Newbie help

2003-07-21 Thread Keith Olmstead
Thanks for all help. This is what I now have: #!/usr/bin/perl my $startdir = "/opt/log/hosts/"; use File::Find; #use strict; use warnings; my @dirlist; @logfile = ("cron","messages","maillog","ldap"); foreach $log (@logfile) { sub eachFile { if (-e $_ && $_ =~ /$log$/) { push @log, $File::Find

Re: Newbie help

2003-07-19 Thread denis
Dont know if anyone has replyed yet.. But why not use "time"? Here's what I'm thinking.. my @t = localtime(time); my $today; $today = sprintf "%4d%02d%02d", $t[5]+1900, $t[4]+1, $t[3]; print "$today"; will print out todays date.. this will give you a place to start.. Denis On Thu, 17 Jul

Re: Newbie help

2003-07-18 Thread Jostein Berntsen
On 17.07.03,14:51, Keith Olmstead wrote: > Hello, > > Been searching though this list for awhile now, and now I am needing some help. I > am not asking for someone to do my code for me, I am trying to learn perl and the > only way for me to do that is to dive staight into it. > > My problem i

Re: Newbie help

2003-07-17 Thread Paul D. Kraus
"Keith Olmstead" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > > Been searching though this list for awhile now, and now I am needing some help. I am not asking for someone to do my code for me, I am trying to learn perl and the only way for me to do that is to dive staig

Re: Newbie Help Needed! Mail Problem!

2003-03-29 Thread R. Joseph Newton
Palm Optins wrote: > Hello All. > > I have a admin script for a protected members area. In it, I can email all the > members > to let them know the Updates of the program. > > For some unknown reason, it keeps sending out double emails for each address. > Can someone tell me what I did wrong? > >

Re: Newbie - Help with writing a memory leak script for an application...

2002-11-13 Thread Ramprasad A Padmanabhan
use tools like memprof for finding memory leaks why bother writing your own Alex Yuen wrote: Hi, I am still a newbie to Perl. I am assigned to write a Perl program to monitor a memory leak on an application running on a Sun system - Solaris. Now, I'm a Windows NT System Administrator...so, I am

RE: Newbie Help please.

2002-03-31 Thread Timothy Johnson
ent: 3/31/02 5:04 AM Subject: Re: Newbie Help please. Sa wrote: > #!/usr/bin/perl -w > $map{"red"} = "apple"; > $map{"green"} = "grass"; > $map{"blue"} = "ocean"; > print "A string please: "; chomp ($some_string = ); &g

Re: Newbie Help please.

2002-03-31 Thread Ahmed Moustafa
Sa wrote: > #!/usr/bin/perl -w > $map{"red"} = "apple"; > $map{"green"} = "grass"; > $map{"blue"} = "ocean"; > print "A string please: "; chomp ($some_string = ); > print "The value for $some_string is $map($some_string)\n"; > > When I run it though I get the following complaint from perl: > > A

Re: Newbie Help please.

2002-03-31 Thread Billie
Hi The term $map($some_string) actually means 2 scalar variables, one is $map and the other is $some_string. You get warning of uninitialized variable because $map is never declared before. The correct way to refer to a value in hash is $map{$some_string}. I think there is a typo in the book Ho

RE: newbie help

2001-09-06 Thread John Edwards
What sort of comparison are you looking to do on the files? Name? Date? Size? CRC? etc... For copying of the files, take a look at the File::Copy module. http://aspn.activestate.com/ASPN/Reference/Products/ActivePerl/lib/File/Copy .html For comparison, Perl has some built in (file test operato

Re: newbie: help with file search

2001-07-16 Thread Ondrej Par
Well, are you trying to find several patterns (file1, file2 etc.) in all files in $dirname, or are you trying to determine wether those file1, file2 etc. exists in $dirname directory? it's not clear from your code anyway, one more note: you don't need to test 'defined(@files=readdir DIR)',