From rkleeman at energoncube.net Mon May 24 12:48:37 2004 From: rkleeman at energoncube.net (Bob Kleemann) Date: Mon Aug 2 21:36:24 2004 Subject: [San-diego-pm] Re: Welcome to the "San-diego-pm" mailing list In-Reply-To: References: Message-ID: <20040524174837.GA14953@energoncube.net> You may have noticed this in your inbox. More importantly, you may have noticed the posting address has changed. Update your records accordingly. On Mon, May 24, 2004 at 12:45:51AM -0500, san-diego-pm-request@pm.org wrote: > Welcome to the San-diego-pm@pm.org mailing list! > > To post to this list, send your email to: > > san-diego-pm@pm.org > > General information about the mailing list is at: > > http://www.pm.org/mailman/listinfo/san-diego-pm > > If you ever want to unsubscribe or change your options (eg, switch to > or from digest mode, change your password, etc.), visit your > subscription page at: > > http://www.pm.org/mailman/options/san-diego-pm/- > > > You can also make such adjustments via email by sending a message to: > > San-diego-pm-request@pm.org > > with the word `help' in the subject or body (don't include the > quotes), and you will get back a message with instructions. > > You must know your password to change your options (including changing > the password, itself) or to unsubscribe. It is: > > - > > Normally, Mailman will remind you of your pm.org mailing list > passwords once every month, although you can disable this if you > prefer. This reminder will also include instructions on how to > unsubscribe or change your account options. There is also a button on > your options page that will email your current password to you. From emileaben at yahoo.com Mon May 24 15:21:31 2004 From: emileaben at yahoo.com (Emile Aben) Date: Mon Aug 2 21:36:24 2004 Subject: [San-diego-pm] Re: Welcome to the "San-diego-pm" mailing list In-Reply-To: <20040524174837.GA14953@energoncube.net> Message-ID: <20040524202131.16713.qmail@web60810.mail.yahoo.com> Hi, --- Bob Kleemann wrote: > You may have noticed this in your inbox. More > importantly, you may have > noticed the posting address has changed. Update > your records > accordingly. I indeed got the 'welcome' message, together with a 'could not deliver' on the old address because I answered Dirks question on Net::Ping this weekend. This explains why I got the 'could not deliver'. Here's my answer again: Hi Dirk, By default Net::Ping doesn't use the same protocol as the 'ping' utility. Net::Ping uses TCP port 7 (echo) while 'ping' uses ICMP. I don't think www.yahoo.com answers the TCP port 7 requests while it answers the ICMP request. A script that works for me (shamelessly stolen/adapted from the Net::Ping documentation, see 'perldoc Net::Ping'): ------------------- use Net::Ping; my $p = Net::Ping->new("tcp", 2); my $host = "www.yahoo.com"; $p->{port_num} = getservbyname("http", "tcp"); print "$host is alive.\n" if $p->ping($host); $p->close(); -------------------- This script connects to the HTTP port (tcp/80) of www.yahoo.com instead of ECHO port (tcp/7). I think Net::Ping doesn't use the ICMP port by default because you need superuser privileges to create ICMP packets (the ping utility itself uses the setuser_id mechanism to get elevated privileges, but thats something thats not advisable in perl). hope this helps, Emile --- Dirk2 wrote: > ~sdpm~ > Perl Mongers, > > Why can't we ping from inside a Perl script? > Anything obvious I'm > missing here? > > ~: uname -a > Linux localhost.localdomain 2.4.21-15.EL #1 Thu Apr > 22 00:26:34 EDT 2004 > i686 athlon i386 GNU/Linux > > That's Red Hat Enterprise Linux ES (v. 3 for x86) > > > > > > Here's the script that fails: > ________________________________________ > #!/usr/bin/perl -w > > use Net::Ping; > > if ( pingecho("www.yahoo.com", 2) ) { > print "Yahoo is on the network.\n"; > } > ________________________________________ > > > > > But ping on the command line works fine: > > ~: ping www.yahoo.com > PING www.yahoo.akadns.net (66.94.230.36) 56(84) > bytes of data. > 64 bytes from p5.www.scd.yahoo.com (66.94.230.36): > icmp_seq=0 ttl=49 > time=22.1 ms > > --- www.yahoo.akadns.net ping statistics --- > 1 packets transmitted, 1 received, 0% packet loss, > time 0ms > rtt min/avg/max/mdev = 22.109/22.109/22.109/0.000 > ms, pipe 2 __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ From kloomis at bigplanet.com Fri May 14 11:31:28 2004 From: kloomis at bigplanet.com (Ken Loomis) Date: Thu Aug 5 00:20:56 2004 Subject: RE question In-Reply-To: <40721C54.7040401@fentin.com> References: <40721C54.7040401@fentin.com> Message-ID: <40A4F460.2090509@BigPlanet.com> ~sdpm~ As a web designer that enjoys programming, I joined this group a few years ago hoping to become proficient at PERL (or, is it Perl). I have learned a lot from looking at the exchanges here, but have to admit that RE's still baffle me. I host a discussion board that is apparently being Spam'ed by hackers. The board is in Perl and I would like an RE that will strip everything except alphanumeric characters from the subject. For example, the subject line should only contain A-Z, a-z & 0-9. The subject line is contained in $FORM('subject'), so I'd like an RE that will replace the contents of that variable with the stripped version. also, I may decide to allow periods ('.'), and would like to see how I'd have to modify that RE to allow that. If anyone can help, I'd appreciate it. thanks, Ken Loomis -- Ken Loomis Consultant Windows, Macintosh, Internet, etc. Helping to make your technology experience more pleasant & profitable ;-) 619-275-6919 / KLoomis@BigPlanet.com ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From chris_radcliff at mac.com Fri May 14 12:13:46 2004 From: chris_radcliff at mac.com (Chris Radcliff) Date: Thu Aug 5 00:20:56 2004 Subject: RE question In-Reply-To: <40A4F460.2090509@BigPlanet.com> References: <40721C54.7040401@fentin.com> <40A4F460.2090509@BigPlanet.com> Message-ID: <0F4B5A39-A5CA-11D8-BA76-00039301A6E2@mac.com> ~sdpm~ Hi Ken, Regular expressions take time and practice. Hang in there. This may do the trick: $FORM{'subject'} =~ s/[^A-Za-z0-9.]//g; Basically, "replace (s///) all (g) characters ([]) in $FORM{'subject'} (=~) that aren't (^) A-Za-z0-9. with nothing." I'm not sure if there's an advantage to using tr/// character translation in this case. I tend to default to regex in case the pattern needs to get more complex down the road. Cheers, ~chris On May 14, 2004, at 9:31 AM, Ken Loomis wrote: > As a web designer that enjoys programming, I joined this group a few > years ago hoping to become proficient at PERL (or, is it Perl). I have > learned a lot from looking at the exchanges here, but have to admit > that RE's still baffle me. > > I host a discussion board that is apparently being Spam'ed by hackers. > The board is in Perl and I would like an RE that will strip everything > except alphanumeric characters from the subject. For example, the > subject line should only contain A-Z, a-z & 0-9. > > The subject line is contained in $FORM('subject'), so I'd like an RE > that will replace the contents of that variable with the stripped > version. also, I may decide to allow periods ('.'), and would like to > see how I'd have to modify that RE to allow that. > > If anyone can help, I'd appreciate it. ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From BWebb at roadrunnersports.com Fri May 14 12:16:02 2004 From: BWebb at roadrunnersports.com (Bret Webb) Date: Thu Aug 5 00:20:56 2004 Subject: RE question Message-ID: <30C9BBF0C2EFB943A7D087CBE6EB11F5182975@mail1bkup> ~sdpm~ I'm sure there are various and better approaches out there, and I'm looking forward to seeing them :} but if nobody decides to respond, here are two approaches I would use: my $newStr = $FORM('subject'); $newStr =~ s/[`\^\*\|><]//igs; This approach requires you to know all special chars to get rid of....The other alternative is: my $newStr = $FORM('subject'); $newStr =~ s/\W+//igs; Unfortunately, this also removes spaces and other chars you may want to keep. In order to preserve the special characters you dont want to get rid of, do a substitution on them first, eg. my $newStr = $FORM('subject'); $newStr =~ s/\./_PD_/igs; $newStr =~ s/ /_SP_/igs; Then $newStr =~ s/\W+//igs; # Remove all special characters including spaces and underscores If the value for $FORM('subject') equals "The man on the moon.", then the string value after substitution would look like this after performing the regex: The SP man SP on SP the SP moon PD Now resubstitute for the placeholders: $newStr =~ s/ SP / /igs; $newStr =~ s/ PD /\./igs; Depending on what your form variable is trying to capture, using SP as a placeholder for resubstitution may or may not be desireable. Using SPACE may not be good either if the form variable is used on a NASA form. In my opinion, the likelihood that SP and PD being submitted as valid values is minimal. I always found it easier to substitute what I wanted to keep rather than remember all of the special characters I wanted to exclude. Good luck. -----Original Message----- From: Ken Loomis [mailto:kloomis@bigplanet.com] Sent: Friday, May 14, 2004 9:31 AM To: San Diego Perl Mongers Subject: RE question ~sdpm~ As a web designer that enjoys programming, I joined this group a few years ago hoping to become proficient at PERL (or, is it Perl). I have learned a lot from looking at the exchanges here, but have to admit that RE's still baffle me. I host a discussion board that is apparently being Spam'ed by hackers. The board is in Perl and I would like an RE that will strip everything except alphanumeric characters from the subject. For example, the subject line should only contain A-Z, a-z & 0-9. The subject line is contained in $FORM('subject'), so I'd like an RE that will replace the contents of that variable with the stripped version. also, I may decide to allow periods ('.'), and would like to see how I'd have to modify that RE to allow that. If anyone can help, I'd appreciate it. thanks, Ken Loomis -- Ken Loomis Consultant Windows, Macintosh, Internet, etc. Helping to make your technology experience more pleasant & profitable ;-) 619-275-6919 / KLoomis@BigPlanet.com ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From david_roe at mac.com Fri May 14 12:29:34 2004 From: david_roe at mac.com (Dave Roe) Date: Thu Aug 5 00:20:56 2004 Subject: RE question In-Reply-To: <40A4F460.2090509@BigPlanet.com> References: <40721C54.7040401@fentin.com> <40A4F460.2090509@BigPlanet.com> Message-ID: <446CB0E1-A5CC-11D8-842E-0003939F10F8@mac.com> ~sdpm~ On May 14, 2004, at 9:31 AM, Ken Loomis wrote: > As a web designer that enjoys programming, I joined this group a few > years ago hoping to become proficient at PERL (or, is it Perl). I have > learned a lot from looking at the exchanges here, but have to admit > that RE's still baffle me. It's Perl. You can learn a lot more at learn.perl.org and/or perldoc. > I host a discussion board that is apparently being Spam'ed by hackers. > The board is in Perl and I would like an RE that will strip everything > except alphanumeric characters from the subject. For example, the > subject line should only contain A-Z, a-z & 0-9. From perldoc perlre: \w Match a "word" character (alphanumeric plus "_") \W Match a non-"word" character > The subject line is contained in $FORM('subject'), so I'd like an RE > that will replace the contents of that variable with the stripped > version. also, I may decide to allow periods ('.'), and would like to > see how I'd have to modify that RE to allow that. You probably meant $FORM{'subject'}. How about: $FORM{subject} =~ s/\W//g; which means "change a non-word char into nothing, repeatedly". $FORM{subject} =~ s/[^\w\.]//g uses a character class to change anything that is _not_ a word char or a period into nothing. Seriously, read perldoc. Start with "perldoc perlrequick" and "perldoc perlretut". HTH, /dave ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From bruce at brtnet.org Fri May 14 12:38:50 2004 From: bruce at brtnet.org (Bruce Timberlake) Date: Thu Aug 5 00:20:56 2004 Subject: question In-Reply-To: <0F4B5A39-A5CA-11D8-BA76-00039301A6E2@mac.com> References: <40721C54.7040401@fentin.com> <40A4F460.2090509@BigPlanet.com> <0F4B5A39-A5CA-11D8-BA76-00039301A6E2@mac.com> Message-ID: <200405141038.50222.bruce@brtnet.org> ~sdpm~ > This may do the trick: > > $FORM{'subject'} =~ s/[^A-Za-z0-9.]//g; Shouldn't that be $FORM{'subject'} =~ s/[^A-Za-z0-9\.]//g; Doesn't a "." without an escaping \ match *any* character? If so, that would throw away *anything* in the incoming string! :) And now that I'm looking at it more, doesn't that regex actually change the characters he wants to keep, and leave all the undesirables in the string?? Maybe I need more coffee this morning... ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From brick at fastpack.com Fri May 14 12:45:34 2004 From: brick at fastpack.com (Brick Robbins) Date: Thu Aug 5 00:20:56 2004 Subject: RE question In-Reply-To: <0F4B5A39-A5CA-11D8-BA76-00039301A6E2@mac.com> References: <40721C54.7040401@fentin.com> <40A4F460.2090509@BigPlanet.com> <0F4B5A39-A5CA-11D8-BA76-00039301A6E2@mac.com> Message-ID: <6.0.3.0.2.20040514103344.04c36eb0@fastpack.com> ~sdpm~ At 10:13 AM 5/14/04, Chris Radcliff wrote: >$FORM{'subject'} =~ s/[^A-Za-z0-9.]//g; you have to escape the "." or it will match everything, so it needs to be "\." I think you also need to allow spaces in your subjects, if you want to keep them readable If you don't mind allowing the underscore you can use "\w" instead of "A-Za-z0-9" so the regex becomes: $FORM{'subject'} =~ s/[^\w\. ]//g; ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From chris_radcliff at mac.com Fri May 14 13:07:51 2004 From: chris_radcliff at mac.com (Chris Radcliff) Date: Thu Aug 5 00:20:56 2004 Subject: question In-Reply-To: <200405141038.50222.bruce@brtnet.org> References: <40721C54.7040401@fentin.com> <40A4F460.2090509@BigPlanet.com> <0F4B5A39-A5CA-11D8-BA76-00039301A6E2@mac.com> <200405141038.50222.bruce@brtnet.org> Message-ID: <9D865D68-A5D1-11D8-BA76-00039301A6E2@mac.com> ~sdpm~ On May 14, 2004, at 10:38 AM, Bruce Timberlake wrote: > Shouldn't that be > > $FORM{'subject'} =~ s/[^A-Za-z0-9\.]//g; > > Doesn't a "." without an escaping \ match *any* character? If so, that > would throw away *anything* in the incoming string! :) Nope, it's a character class. "." loses its special meaning. (Besides, I always run a small program to check my PM replies these days. Folks are finicky about stuff workin'. ;) I think that "\." in a character class would actually retain the "\" character, but I'm too lazy to check. > And now that I'm looking at it more, doesn't that regex actually > change the characters he wants to keep, and leave all the > undesirables in the string?? Nope, that's what the [^] negation is for. A very handy thing, that negation. "Dump everything but what I want." I use it for HTML escaping and suchlike. Cheers, ~chris --- ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From merlyn at stonehenge.com Fri May 14 13:09:08 2004 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Thu Aug 5 00:20:56 2004 Subject: question In-Reply-To: <200405141038.50222.bruce@brtnet.org> References: <40721C54.7040401@fentin.com> <40A4F460.2090509@BigPlanet.com> <0F4B5A39-A5CA-11D8-BA76-00039301A6E2@mac.com> <200405141038.50222.bruce@brtnet.org> Message-ID: <86wu3eyj7f.fsf@blue.stonehenge.com> ~sdpm~ >>>>> "Bruce" == Bruce Timberlake writes: >> $FORM{'subject'} =~ s/[^A-Za-z0-9.]//g; Bruce> Shouldn't that be Bruce> $FORM{'subject'} =~ s/[^A-Za-z0-9\.]//g; No, inside a character class, dot means dot, not "match almost everything except a newline". Many of the "special" characters are normal inside a char class. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From kloomis at bigplanet.com Fri May 14 13:28:52 2004 From: kloomis at bigplanet.com (Ken Loomis) Date: Thu Aug 5 00:20:56 2004 Subject: question In-Reply-To: <86wu3eyj7f.fsf@blue.stonehenge.com> References: <40721C54.7040401@fentin.com> <40A4F460.2090509@BigPlanet.com> <0F4B5A39-A5CA-11D8-BA76-00039301A6E2@mac.com> <200405141038.50222.bruce@brtnet.org> <86wu3eyj7f.fsf@blue.stonehenge.com> Message-ID: <40A50FE4.8070405@BigPlanet.com> An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/san-diego-pm/attachments/20040514/1f27f5fb/attachment.htm From bruce at brtnet.org Fri May 14 14:00:16 2004 From: bruce at brtnet.org (Bruce Timberlake) Date: Thu Aug 5 00:20:56 2004 Subject: question In-Reply-To: <9D865D68-A5D1-11D8-BA76-00039301A6E2@mac.com> References: <40721C54.7040401@fentin.com> <200405141038.50222.bruce@brtnet.org> <9D865D68-A5D1-11D8-BA76-00039301A6E2@mac.com> Message-ID: <200405141200.16229.bruce@brtnet.org> ~sdpm~ > > $FORM{'subject'} =~ s/[^A-Za-z0-9\.]//g; > > > > Doesn't a "." without an escaping \ match *any* character? If so, > > that would throw away *anything* in the incoming string! :) > > Nope, it's a character class. "." loses its special meaning. I *knew* I needed more coffee... thanks for the clarification! > Nope, that's what the [^] negation is for. A very handy thing, > that negation. "Dump everything but what I want." I use it for > HTML escaping and suchlike. Silly me, I still think of ^ as being just "start of" whatever (like $ is "end of")... {sigh}... much to learn, much to learn... :) ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From chris_radcliff at mac.com Fri May 14 14:39:23 2004 From: chris_radcliff at mac.com (Chris Radcliff) Date: Thu Aug 5 00:20:56 2004 Subject: question In-Reply-To: <40A50FE4.8070405@BigPlanet.com> References: <40721C54.7040401@fentin.com> <40A4F460.2090509@BigPlanet.com> <0F4B5A39-A5CA-11D8-BA76-00039301A6E2@mac.com> <200405141038.50222.bruce@brtnet.org> <86wu3eyj7f.fsf@blue.stonehenge.com> <40A50FE4.8070405@BigPlanet.com> Message-ID: <66D9BDD8-A5DE-11D8-BA76-00039301A6E2@mac.com> ~sdpm~ On May 14, 2004, at 11:28 AM, Ken Loomis wrote: > The one thing I can't quite figure out is how the hackers are > entering carriage returns (or, new lines) to achieve multiple lines in > the subject. Mark Jason Dominus once gave a talk about Web application security. His first rule was, "Never trust the browser." It's possible to submit all sorts of things (including %0A, a newline), and some browsers allow anything to be entered in a text field, even if yours doesn't. :) > I am assuming the RE above does remove those the carriage returns and > the new lines. Is that correct? That is. In this case, \n and \r are both matched by "characters that aren't A-Za-z0-9. ," and therefore removed. ~c -- ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From rkleeman at energoncube.net Mon May 17 21:57:03 2004 From: rkleeman at energoncube.net (Bob Kleemann) Date: Thu Aug 5 00:20:56 2004 Subject: Meeting Tues at 7PM Message-ID: <20040518025703.GA32654@energoncube.net> ~sdpm~ Sorry for the late reminder folks, but there is a meeting Tuesday evening: 7PM at Callahan's in Mira Mesa. Please let me know if you plan to attend so I can get properly sized reservations, and please let me know if you need some help getting there. See you all tommorow! ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From Dirk at finches.com Sat May 22 08:39:40 2004 From: Dirk at finches.com (Dirk2) Date: Thu Aug 5 00:20:56 2004 Subject: ping In-Reply-To: <20040518025703.GA32654@energoncube.net> References: <20040518025703.GA32654@energoncube.net> Message-ID: <1085233180.3076.70.camel@localhost.localdomain> ~sdpm~ Perl Mongers, Why can't we ping from inside a Perl script? Anything obvious I'm missing here? ~: uname -a Linux localhost.localdomain 2.4.21-15.EL #1 Thu Apr 22 00:26:34 EDT 2004 i686 athlon i386 GNU/Linux That's Red Hat Enterprise Linux ES (v. 3 for x86) Here's the script that fails: ________________________________________ #!/usr/bin/perl -w use Net::Ping; if ( pingecho("www.yahoo.com", 2) ) { print "Yahoo is on the network.\n"; } ________________________________________ But ping on the command line works fine: ~: ping www.yahoo.com PING www.yahoo.akadns.net (66.94.230.36) 56(84) bytes of data. 64 bytes from p5.www.scd.yahoo.com (66.94.230.36): icmp_seq=0 ttl=49 time=22.1 ms --- www.yahoo.akadns.net ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 22.109/22.109/22.109/0.000 ms, pipe 2 ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human.