Re: Subroutine and @_ confusion

2004-04-05 Thread WilliamGunther
In a message dated 4/5/2004 11:25:56 AM Eastern Daylight Time, [EMAIL PROTECTED] writes: >I have seen shift used in Subroutines like: "NumberOfApples = >shift(@_);", >any reason for writing the subroutine that way? You'll frequently see shift in subs. Like "$class = shift;" (Default for shift i

Re: Regular expression question: non-greedy matches

2004-04-05 Thread R. Joseph Newton
Boris Shor wrote: > Thanks for writing. Hi Boris, Please don't top-post. It makes it very difficult to get the context of your message. Istead, post following the material to which you are responding. > Your code works for this example but doesn't get exactly > what I need. It's important to

RE: New to Perl

2004-04-05 Thread Charles K. Clarkson
david <[EMAIL PROTECTED]> wrote: : : Charles K. Clarkson wrote: : : > david <[EMAIL PROTECTED]> wrote: : > : : > : this is impossible in Perl. show me an example : > : where something is neither true nor false. : > : > Er, um, well ... : > [snipped code] : : you simply overload bool and c

Re: Subroutine and @_ confusion

2004-04-05 Thread Angie Ahl
Thanks Will & Bob. using $class->FindLink(LinkID => $LinkID); has fixed it. I needed to use it for every internal call to a subroutine within my package and I'm now getting exactly what I needed. For the archives purpose, use &subroutine_name instead of $class->subroutine_name passed the @_ th

RE: using strict

2004-04-05 Thread david
Guay Jean-SÃbastien wrote: > I am sorry David, it just seems like I am having trouble communicating > clearly. We are apparently in a disagreement, but your points are not at > all what I wanted to explain... I'll try again. i totally understand what you are saying and like i said before, your po

RE: New to Perl

2004-04-05 Thread david
Charles K. Clarkson wrote: > david <[EMAIL PROTECTED]> wrote: > : > : this is impossible in Perl. show me an example > : where something is neither true nor false. > > Er, um, well ... > > #!/usr/bin/perl > > package foo; > > use strict; > use warnings; > > use Carp 'croak'; > use overlo

Re: Weekly list FAQ posting

2004-04-05 Thread Ken Wolcott
On Mon, 2004-04-05 at 11:00, [EMAIL PROTECTED] wrote: > NAME > beginners-faq - FAQ for the beginners mailing list ...nice FAQ snipped for brevity... Could you please add something to the subject line stating that this email message is pertinent to the beginners perl list...something like: Su

Weekly list FAQ posting

2004-04-05 Thread casey
NAME beginners-faq - FAQ for the beginners mailing list 1 - Administriva 1.1 - I'm not subscribed - how do I subscribe? Send mail to <[EMAIL PROTECTED]> You can also specify your subscription email address by sending email to (assuming [EMAIL PROTECTED] is your email address):

Re: Subroutine and @_ confusion

2004-04-05 Thread gohaku
On Apr 5, 2004, at 9:40 AM, [EMAIL PROTECTED] wrote: In a message dated 4/5/2004 7:52:33 AM Eastern Daylight Time, [EMAIL PROTECTED] writes: Hi People I'm trying to get a grip on passing @_ to subroutines. Or rather NOT passing it. I have a package: sub HLOM::Links::new { my ($class, %arg) =

RE: tracking mail logs

2004-04-05 Thread Price, Jason (TLR Corp)
Sounds like a great idea to me. I have a similar script on my to-do list, but not sure when I'll be able to get to it. Sendmail is widely enough used to warrant a module for it, I would think... Jason -Original Message- From: Traeder, Philipp [mailto:[EMAIL PROTECTED] Sent: Monday, Ap

FW: tracking mail logs

2004-04-05 Thread Traeder, Philipp
> -Original Message- > From: Smoot Carl-Mitchell [mailto:[EMAIL PROTECTED] > > On Sun, 04 Apr 2004 18:35:09 -0400 > WC -Sx- Jones <[EMAIL PROTECTED]> wrote: > > > [ BTW - I did se Mail::Toaster and I am currently researching it, > > but it doesn't hurt to ask ... not too painfully anyways.

Re: tracking mail logs

2004-04-05 Thread Smoot Carl-Mitchell
On Sun, 04 Apr 2004 18:35:09 -0400 WC -Sx- Jones <[EMAIL PROTECTED]> wrote: > [ BTW - I did se Mail::Toaster and I am currently researching it, > but it doesn't hurt to ask ... not too painfully anyways... ] > > I have a huge set of logs (from many mail servers) that each have logs > in this form

RE: Subroutine and @_ confusion

2004-04-05 Thread Bob Showalter
Angie Ahl wrote: > ... > These subroutines are called externally ie > HLOM::Links->FindLink(LinkID => $id); > > but also internally ie &FindLink(LinkID => $id); > > I read in Perlsub that doing &FindLink will pass the current @_ to the > subroutine. Great. Only if you omit the argument list as

RE: using strict

2004-04-05 Thread Guay Jean-Sébastien
Hello Joseph, David, > A stronger argument has to do with mindset. The || operator is an > expression evaluation operator, appropriate to mathematical or paramathematical > expressions. The context really calls for a flow-control operator, or. Thanks for making my point better than I could, Jos

RE: using strict

2004-04-05 Thread Guay Jean-Sébastien
Hello Joseph, > One thing I would request is that you trim off any material to which you are not > responding from old posts. This helps keep bandwidth and storage needs down. I'll keep that in mind. I usually don't keep all the thread of replies that Outlook ( grrr) keeps at the bottom, seems l

RE: using strict

2004-04-05 Thread Guay Jean-Sébastien
I am sorry David, it just seems like I am having trouble communicating clearly. We are apparently in a disagreement, but your points are not at all what I wanted to explain... I'll try again. > you should test it yourself. i am not sure how good you are > with Perl and i > don't want to sound lik

Re: Subroutine and @_ confusion

2004-04-05 Thread WilliamGunther
In a message dated 4/5/2004 7:52:33 AM Eastern Daylight Time, [EMAIL PROTECTED] writes: >Hi People > >I'm trying to get a grip on passing @_ to subroutines. Or rather NOT >passing it. > >I have a package: > >sub HLOM::Links::new { >my ($class, %arg) = @_; >my $userid = 0; >if ($arg{use

Re: Explanation of G Modifier

2004-04-05 Thread WC -Sx- Jones
gohaku wrote: "What good is \G in a regular expression?" while (<>) { chomp; PARSER: { m/ \G( \d+\b)/gcx&& do { print "number: $1\n"; redo; }; m/ \G( \w+ )/gcx&& do { print "word: $1\n"; redo; }; m/ \G( \s+ )/gcx&& do { print "space: $1\n"; redo; };

Subroutine and @_ confusion

2004-04-05 Thread Angie Ahl
Hi People I'm trying to get a grip on passing @_ to subroutines. Or rather NOT passing it. I have a package: sub HLOM::Links::new { my ($class, %arg) = @_; my $userid = 0; if ($arg{userid}) {$userid = int $arg{userid};} bless { _UserID => $userid,

modules missing !

2004-04-05 Thread Laurence Moughan
Hi Al, using perl v5.9.1on solaris 8 Im trying to get a perl application working that required some modules, these i download from cpan and deployed., see install below, obemgn2# make install Installing /usr/local/lib/perl5/site_perl/5.9.1/MIME/Head.pm Installing /usr/local/lib/perl5/site_per

FW: Regular expression question: non-greedy matches

2004-04-05 Thread Boris Shor
Thanks for writing. I get no warnings when I use (ActiveState Perl on Windows): use Strict; use Warnings; $test = "Yea 123xrandomYea 456xdumdumNay 789xpop"; while ($test =~ /Yea (.*?)x.*?(Nay (.*?)x)?/g) { print "$1\n"; print "$2\n"; } What I am looking for are pairs: $1

RE: Regular expression question: non-greedy matches

2004-04-05 Thread Boris Shor
Thanks for writing. Your code works for this example but doesn't get exactly what I need. It's important to me to keep $1 and $2 separate because Yeas and Nays are paired together (these are votes on bills). But sometimes, you only have Yeas (eg, a unanimous vote). That is why I want to see: 123

RE: File Handling

2004-04-05 Thread Traeder, Philipp
Hi Prabu, > I have wrote a script to search for a pattern and replace > it in all files of a directory,that i specified at > commandline.I want another one thing is to be done in the > script.That's,it should search only for the type of files I > specified at commandline.That is,it should

Re: Explanation of G Modifier

2004-04-05 Thread Randy W. Sims
WC -Sx- Jones wrote: gohaku wrote: Hi everyone, Sorry for asking this question again for what must be the umpteenth time but I have a problem with the g modifier when matching. I have read Newsgroup Postings about this topic including: "What good is \G in a regular expression?" G is likely be

Re: Error in Script

2004-04-05 Thread David Kirol
You'll need to fix this also > ($str1,$str2) = split(/./, $filetoopen); It should be: ($str1,$str2) = split(/\./, $filetoopen); So that split can funcrion as you expect. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

File Handling

2004-04-05 Thread senthil prabu
Hi, I have wrote a script to search for a pattern and replace it in all files of a directory,that i specified at commandline.I want another one thing is to be done in the script.That's,it should search only for the type of files I specified at commandline.That is,it should get the extensi

Re: CPAN install from a local directory of module sources

2004-04-05 Thread Randy W. Sims
WC -Sx- Jones wrote: zentara wrote: Is it possible to put a dirlist of my module sources into a file, and feed the file to CPAN and let it install each one? If CPAN is properly confiured to start with; on the OLD system - do: perl -MCPAN -e 'autobundle' If you want to automate installation, I'd