Perl and Unix/Linux Tutorials

2005-09-07 Thread Mark Sargent
Hi All, can anyone point me to some sites(tutorials) that deal with Perl and Linux(Unix) admin stuff.? I'm hoping to use Perl for just that, as opposed to Web stuff etc. I've been following this tutorial, http://www.codebits.com/p5be/ which is great. Certainly well written for a newbie.

Net::POP3

2005-09-07 Thread Gerard Robin
Hello, I use Net::POP3 for donwload the header of my messages. . $pop = Net::POP3-new($server); ... $top = $pop-top($msgnum); ... my ($from) = grep /^From:/i, @lines; my ($to) = grep /^To:/i, @lines; my ($subject) = grep /^Subject:/i, @lines; ... When To is: To: beginners@perl.org

deciphering regular expressions

2005-09-07 Thread Christopher Spears
I am trying to figure out what the following regular expression is look for: if ( $line =~ /(\/data\/Shows.*)/ ) Is it trying to find a line that has the phrase dataShows in it? What is the double quote for? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: deciphering regular expressions

2005-09-07 Thread Jeff Pan
find this: /data/Shows* such as: /data/Shows /data/Shows.jpg /data/Shows888 /data/Shows/other ... the double quote has no special meaning. On Wed, 7 Sep 2005 00:36:08 -0700 (PDT), Christopher Spears [EMAIL PROTECTED] said: I am trying to figure out what the following regular expression is

Re: Perl and Unix/Linux Tutorials

2005-09-07 Thread Michael Demelbauer
Thus spaketh Mark Sargent: Hi All, can anyone point me to some sites(tutorials) that deal with Perl and Linux(Unix) admin stuff.? I'm hoping to use Perl for just that, as opposed to Web stuff etc. I've been following this tutorial, http://www.codebits.com/p5be/ which is great. Certainly

Re: Net::POP3

2005-09-07 Thread John W. Krahn
Gerard Robin wrote: Hello, Hello, I use Net::POP3 for donwload the header of my messages. . $pop = Net::POP3-new($server); ... $top = $pop-top($msgnum); ... my ($from) = grep /^From:/i, @lines; my ($to) = grep /^To:/i, @lines; my ($subject) = grep /^Subject:/i, @lines;

Re: Perl and Unix/Linux Tutorials

2005-09-07 Thread John W. Krahn
Mark Sargent wrote: Hi All, Hello, can anyone point me to some sites(tutorials) that deal with Perl and Linux(Unix) admin stuff.? I'm hoping to use Perl for just that, as opposed to Web stuff etc. I've been following this tutorial, http://www.codebits.com/p5be/ which is great. Certainly

Stop XML::Parser

2005-09-07 Thread [EMAIL PROTECTED]
Hi, I have a simple question about XML::Parser. Is there a way to stop parsing in progress and how ? Thanks in advance, Andre -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

big pattern matching

2005-09-07 Thread Tim Wolak
All, I need to clean up a host file from the worm that was out a couple weeks ago. I have done pattern matching but not this big before, can anyone offer some advice on how to clean this up. I do have some machines that have host entries in this file so I don't want to delete any of that

Re: big pattern matching

2005-09-07 Thread Chris Devers
On Wed, 7 Sep 2005, Tim Wolak wrote: I need to clean up a host file from the worm that was out a couple weeks ago. I have done pattern matching but not this big before, can anyone offer some advice on how to clean this up. I do have some machines that have host entries in this file so I

Re: big pattern matching

2005-09-07 Thread Tim Wolak
Rightly so but I have a big script for removing entries in the registry and the files the virus inserts so I'd like to do it with the script to get it done in one pass. On 9/7/05, Chris Devers [EMAIL PROTECTED] wrote: On Wed, 7 Sep 2005, Tim Wolak wrote: I need to clean up a host file

Re: naming subroutine reference parameter?

2005-09-07 Thread matija
Jeff Pan wrote: my (%hash,@array); sub_test(\%hash,[EMAIL PROTECTED]); has special meaning so it should be dropped when not needing particular special behavior. I can't understand for this,can u give me some examples? perldoc perlsub -- NAME(LIST); # Circumvent prototypes.

CHILD_ERROR and forking within a child

2005-09-07 Thread steve abrams
* code 'paraphrased' for simplicity * Hi all, I have a script which goes to a subroutine. Within the subroutine, there exists: $pid = fork; push(@pids, $pid); unless ($pid) { my $var = new Object; if (not $var-method_that_evokes_a_child()) {Exit;} exit 2; } where the

RE: CHILD_ERROR and forking within a child

2005-09-07 Thread Bob Showalter
steve abrams wrote: * code 'paraphrased' for simplicity * Hi all, I have a script which goes to a subroutine. Within the subroutine, there exists: $pid = fork; push(@pids, $pid); unless ($pid) { my $var = new Object; if (not $var-method_that_evokes_a_child())

Re: big pattern matching

2005-09-07 Thread Chris Devers
On Wed, 7 Sep 2005, Tim Wolak wrote: Rightly so but I have a big script for removing entries in the registry and the files the virus inserts so I'd like to do it with the script to get it done in one pass. Okay, but it still seems like overkill to me. If you have a known-good hosts file,

getting error from backtick shell execution

2005-09-07 Thread Frank Geueke, III
Hi Everyone. I've been reading the list for the past few days now and I have something maybe worth asking. What I am wondering about at the moment is how to get a possible error message from a command that is run in the shell. i.e. my $cmd = sudo -u userlogin . /usr/bin/ssh -l $cnrip_user

Re: getting error from backtick shell execution

2005-09-07 Thread Jay Savage
On 9/7/05, Frank Geueke, III [EMAIL PROTECTED] wrote: Hi Everyone. I've been reading the list for the past few days now and I have something maybe worth asking. What I am wondering about at the moment is how to get a possible error message from a command that is run in the shell. i.e. my

Having Issues installing ReadKey on Windows Paltform

2005-09-07 Thread Gibbons, David
Hello all, I seem to be having an issue with ReadKey. I downloaded the latest tar and followed the instructions in the readme. However, when I tried to use make (ported from unix) I get an error makefile:336: *** multiple target patterns. Stop. Anyone seen this before or have a work around

Re: Perl and Unix/Linux Tutorials

2005-09-07 Thread Mark Sargent
Hi All, All of these examples are using LISTS! An array is something with a '@' sigil in front of it. Also chapter 8 has examples where he shows passing a reference to a list (and calling it an array) in a sub and dereferencing it as an array which will not work. He also uses deprecated hash