Re: New to Perl

2004-04-03 Thread R. Joseph Newton
Oliver Schnarchendorf wrote: > On Fri, 2 Apr 2004 12:19:32 -0800 , Bajaria, Praful wrote: > > However, when I print > > print "content $request->content \n"; I get "content > > HTTP::Request=HASH(0x8546b3c)->content" > > and print "$response->message \n"; give me "message > > HTTP::Response=HASH(0

Re: New to Perl

2004-04-03 Thread WC -Sx- Jones
R. Joseph Newton wrote: How about just "non-zero"? ("non-zero") ? print "Boo..." : ''; __END__ :) -Sx- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: New to Perl

2004-04-03 Thread R. Joseph Newton
"John W. Krahn" wrote: > > 1 or greater > > -1 or less A pox on both your houses: ;-o) Greetings! E:\d_drive\perlStuff>perl -w my $test = .1; print (($test ? $test : 'false'), "\n"); ^Z 1e-005 Greetings! E:\d_drive\perlStuff>perl -w my $test = -.1; print (($test ? $test : 'false'), "\n

Re: CGI.pm - Remote_Addr

2004-04-03 Thread WC -Sx- Jones
Mark Weisman wrote: trying to pull a remote_addr with CGI.pm, however, the machine I'm doing it on is behind a firewall. The Remote_addr keeps showing the firewall address regardless where I login from. How do I set up the net to grab the right remote_addr on the server? I'm using NATD and IPFW at

RE: nested parens

2004-04-03 Thread Charles K. Clarkson
JupiterHost.Net <[EMAIL PROTECTED]> wrote: : : [EMAIL PROTECTED] wrote: : > Is there a module out there that I can use to parse : > a text line and return the pieces that are enclosed : > in paren's? : : You don't need a module for that just use regex's: : : my @text_inside_parens = $string =~ m

CGI.pm - Remote_Addr

2004-04-03 Thread Mark Weisman
This might be a little off-topic and/or a double post of which I'm really sorry, but my mail server has done bad things to me lately. I'm trying to pull a remote_addr with CGI.pm, however, the machine I'm doing it on is behind a firewall. The Remote_addr keeps showing the firewall address regardles

Re: Using $_ in a function if no argument is passed

2004-04-03 Thread JupiterHost.Net
Thank you to all the responders! I love getting insights like this, Yes I will not use that method (see subject), just love lots of points of view to better my angle :) Thanks again ;p Lee.M - JupiterHost.Net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAI

Re: test - please ignore

2004-04-03 Thread Paul Johnson
On Sat, Apr 03, 2004 at 03:18:14PM -0800, Randal L. Schwartz wrote: > You failed the test. Now you must hang your head in shame. > At a bare minimum, you are now being ignored by everyone (including me) > who understands that what you just did was wrong and wasteful. > > And I say this publicly

Re: nested parens

2004-04-03 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: Is there a module out there that I can use to parse a text line and return the pieces that are enclosed in paren's? You don't need a module for that just use regex's: my @text_inside_parens = $string =~ m/\((.*)\)/g; HTH Lee.M - JupiterHost.Net Thanks -- To unsubscr

Re: test - please ignore

2004-04-03 Thread Randal L. Schwartz
You failed the test. Now you must hang your head in shame. At a bare minimum, you are now being ignored by everyone (including me) who understands that what you just did was wrong and wasteful. And I say this publicly so that others viewing the archive of this group understand that this sort of

Re: How to determine if STDIN has piped data?

2004-04-03 Thread Adam
Bryan, The scope of this conversation seems beyond my ability, but I think I can answer you're question - I'm sure someone will correct me if I'm wrong :) You're looking to put together scripts that act like typical command-line commands like `ls` or `cat`. I use the magic of the diamond oper

Re: Using $_ in a function if no argument is passed

2004-04-03 Thread Smoot Carl-Mitchell
On Sat, 03 Apr 2004 11:49:02 -0800 "R. Joseph Newton" <[EMAIL PROTECTED]> wrote: > > If one wanted to write a function that used either the given > > argument or$_ how would you do that? > > Don't > > > myfunc($myvalue); > > or > > myfunc; #uses the current value of $_ > > > > sub myfunc { >

Re: Using $_ in a function if no argument is passed

2004-04-03 Thread R. Joseph Newton
Paul Johnson wrote: > > $_ = "Leave me alone!"; > $s = "0"; Better yet: $lower_or-mixed_case_string = 'o'; > to_upper $lower_or-mixed_case_string; With intelligent use of the editing facilities available, extra characters do not cost much. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: Using $_ in a function if no argument is passed

2004-04-03 Thread R. Joseph Newton
"JupiterHost.Net" wrote: > Hello List, > > It just occurred to me that many Perl functions use $_ if not other > value is supplied. chomp for instance..., which is very handy... Yes. Like the peaceful feeling that comes the first time one shoots up junk. > If one wanted to write a function that

Re: Basic question

2004-04-03 Thread R. Joseph Newton
"Kumar, Praveen (cahoot)" wrote: > Hello, Hi Praveen.K [Is that what your friends call you in conversation?] > >I am completely new to perl, and i am trying to write a small > script, which based on the input given displays the value in an array. But > when i try to execute the scri

Re: CPAN install from a local directory of module sources

2004-04-03 Thread WC -Sx- Jones
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' After a LOT of stuff ... it will write something like:

Re: CPAN install from a local directory of module sources

2004-04-03 Thread WC -Sx- Jones
WC -Sx- Jones wrote: push @targets, (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && /^Makefile\.PL\z/s && sprintf("%s",$name); Or ...

Re: Using $_ in a function if no argument is passed

2004-04-03 Thread Smoot Carl-Mitchell
On Sat, 3 Apr 2004 11:04:35 -0600 "Charles K. Clarkson" <[EMAIL PROTECTED]> wrote: > Smoot Carl-Mitchell <[EMAIL PROTECTED]> wrote: > : > >sub test { > : > > > : > > my $arg; > : > > $arg = shift or $arg = $_; > : > >} > : > > : > Same problem as the last suggestion. > : > : And what specifical

Re: CPAN install from a local directory of module sources

2004-04-03 Thread WC -Sx- Jones
zentara wrote: So my question is this: Say I have a directory of 200 modules, all in tgz packages, and I want to install them into my freshly built new Perl version. [off the top of my head, untested] Inside the directory of TGZ modules - #! /usr/local/bin/perl -w eval 'exec /usr/local/bin/per

test - please ignore

2004-04-03 Thread Oliver Fuchs
-- ... don't touch the bang bang fruit -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Using $_ in a function if no argument is passed

2004-04-03 Thread Charles K. Clarkson
Smoot Carl-Mitchell <[EMAIL PROTECTED]> wrote: : : On 3 Apr 2004 14:40:43 - : [EMAIL PROTECTED] (Peter Scott) wrote: : : > In article <[EMAIL PROTECTED]>, : > [EMAIL PROTECTED] (Smoot Carl-Mitchell) writes: : > > : > >sub test { : > > : > > my $arg; : > > $arg = shift or $arg = $_; : > >

Re: Using $_ in a function if no argument is passed

2004-04-03 Thread Smoot Carl-Mitchell
On 3 Apr 2004 14:40:43 - [EMAIL PROTECTED] (Peter Scott) wrote: > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (Smoot Carl-Mitchell) writes: > >On Fri, 02 Apr 2004 10:37:14 -0600 > >"JupiterHost.Net" <[EMAIL PROTECTED]> wrote: > > > >> It just occurred to me that many Perl functions us

Re: Using $_ in a function if no argument is passed

2004-04-03 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Smoot Carl-Mitchell) writes: >On Fri, 02 Apr 2004 10:37:14 -0600 >"JupiterHost.Net" <[EMAIL PROTECTED]> wrote: > >> It just occurred to me that many Perl functions use $_ if not other >> value is supplied. chomp for instance..., which is very han