RE: how to regex or

2003-09-30 Thread Jerry Preston
Tim, Yes, I will try it again. A typo on my part! Thanks, Jerry -Original Message- From: Tim Johnson [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 10:59 PM To: 'Jerry Preston'; Tim Johnson; [EMAIL PROTECTED] Subject: RE: how to regex or Then maybe I'm not understanding

RE: how to regex or

2003-09-30 Thread Tim Johnson
Then maybe I'm not understanding what you're asking. Take the following example: ### my $string = "him||her||him||her"; $string =~ s/\|\|/ or /g; print $string; ### The output is "him or her or him or her" Is that not what you're asking? -Original Message- F

RE: how to regex or

2003-09-30 Thread Jerry Preston
Tim, Yes, but does not do the job. Thanks, Jerry -Original Message- From: Tim Johnson [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 9:09 PM To: 'Jerry Preston'; [EMAIL PROTECTED] Subject: RE: how to regex or Have you tried this? s/\|\|/ or /g; -Original Message---

Re: how to do a popup browser window

2003-09-30 Thread Wiggins d'Anconia
Jerry Preston wrote: Hi, I want to be able to create a browser popup window big enough to hold my text data. Is this possible or do I need to use JavaScript or something else? You are going to need something client side, as I am assuming you are talking about from CGI/mod_perl, which are server

Re: Package variables allowed?

2003-09-30 Thread Wiggins d'Anconia
Because you seem to have been asking several questions about scoping and packages, etc. I found the following link extremely enlightening when first tackling this subject: http://perl.plover.com/FAQs/Namespaces.html http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additiona

RE: how to regex or

2003-09-30 Thread Tim Johnson
Have you tried this? s/\|\|/ or /g; -Original Message- From: Jerry Preston [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 7:06 PM To: [EMAIL PROTECTED] Subject: how to regex or Hi! I am trying to swap all the '||' in a string to or: s/||/ or /g; I have tried it

how to regex or

2003-09-30 Thread Jerry Preston
Hi! I am trying to swap all the '||' in a string to or: s/||/ or /g; I have tried it a number of ways, but I am getting no where. Any ideas? Thanks, Jerry -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Look At This Package

2003-09-30 Thread perl
Can't believe you guys didn't catch it. I had parenthesis instead of braces ;) $ui->(fname) = "bob"; #incorrect () $ui->{fname} = "bob"; #correct {} Thank for you help. Now asome enlighten questions. - Are the fname and lname implicitly declared? - I guess you can't have vars outside of the metho

Re: Look At This Package

2003-09-30 Thread perl
OK version x.3 Please just change these lines to make it work. The calling program test.pl fails on the assignment line: Bareword "fname" not allowed while "strict subs" in use at utest line 8. Bareword "lname" not allowed while "strict subs" in use at utest line 9. Bareword "fname" not allowed wh

how to do a popup browser window

2003-09-30 Thread Jerry Preston
Hi, I want to be able to create a browser popup window big enough to hold my text data. Is this possible or do I need to use JavaScript or something else? Thanks, Jerry -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Look At This Package

2003-09-30 Thread perl
It did complain or else I would have sent a thank you for making it work already ;) > James pretty much covered everything, but here are my two coppers. > > First thing is that this line is wrong... > >> my $self = { fname, lname }; > > It should be this... > > my $self = {fname => '', lname => ''

Re: Can't do setuid

2003-09-30 Thread John W. Krahn
Artur Wystub wrote: > > Hello, Hello, > I've tried to install bugzilla on my linux box but when i > try to run the perl-scripts as a user i get the message "Can't do setuid". > When i'm logged in as root the scripts works. perldoc perldiag [snip] Can't do setuid (F) This typic

RE: Look At This Package

2003-09-30 Thread Hanson, Rob
James pretty much covered everything, but here are my two coppers. First thing is that this line is wrong... > my $self = { fname, lname }; It should be this... my $self = {fname => '', lname => ''}; If you had use strict or warnings on it would have yelled about that one. The way you had it,

Re: Look At This Package

2003-09-30 Thread James Edward Gray II
On Tuesday, September 30, 2003, at 06:51 PM, [EMAIL PROTECTED] wrote: James and Bob, OK version x.2 - I want to create a user object with value initialized. I showed you how to do this in my last message. Go back and take a look. - Initialize/Change it anytime It's best to do this with access

Re: Look At This Package

2003-09-30 Thread perl
James and Rob, OK version x.2 - I want to create a user object with value initialized. - Initialize/Change it anytime test.pl --- use UserInfo; my $ui = new UserInfo(); $ui->(fname) = "bob"; $ui->(lname) = "Bingham"; #change name $ui->(fname) = "robert"; print "ui: [" . $ui->full_name() .

Re: Look At This Package

2003-09-30 Thread perl
James and Bob, OK version x.2 - I want to create a user object with value initialized. - Initialize/Change it anytime test.pl --- use UserInfo; my $ui = new UserInfo(); $ui->(fname) = "bob"; $ui->(lname) = "Bingham"; #change name $ui->(fname) = "robert"; print "ui: [" . $ui->full_name() .

Re: Look At This Package

2003-09-30 Thread James Edward Gray II
On Tuesday, September 30, 2003, at 06:01 PM, [EMAIL PROTECTED] wrote: Can someone make this work like I want? I'm trying to create a package USER and reference/change it. The only thing I'm able to do is to call the sub prtAll. I just want a structure that I can pass around in perl. test.pl ---

RE: Look At This Package

2003-09-30 Thread Hanson, Rob
> #this does NOT work > #how do i reference these vars > USER::fname="bob"; > USER::lname="Bingham"; You need the $, like this... $USER::fname="bob"; $USER::lname="Bingham"; But this may be what you really want. It will allow you to create multiple USER objects, each with different values stored

Look At This Package

2003-09-30 Thread perl
Can someone make this work like I want? I'm trying to create a package USER and reference/change it. The only thing I'm able to do is to call the sub prtAll. I just want a structure that I can pass around in perl. test.pl --- use USER; #this does NOT work #how do i reference these vars USER::

Can't do setuid

2003-09-30 Thread Artur Wystub
Hello, I've tried to install bugzilla on my linux box but when i try to run the perl-scripts as a user i get the message "Can't do setuid". When i'm logged in as root the scripts works. Thank you in advance Artur -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [

Re: who's the master????

2003-09-30 Thread SilverFox
Thanks budwill look into that.. Ramprasad A Padmanabhan wrote: > Silverfox wrote: >> hey guys, I'm trying to figure out how to stripe "Anything Else", >> "7:15pm" and "9:50pm" from the below html code. Any ides? >> >> > href="/showtimes/movie.adp?movieid=16038&date=20030929&theaterid=757"

Re: vaiables global and local

2003-09-30 Thread david
[EMAIL PROTECTED] wrote: > Does the use strict; impact the "my $x;" declaration any differently? no. 'my $x;' creates a lexical variable $x which is local to the block $x is declared no matter you 'use strict;' or not use strict. > > What does "our $x;" do? > perldoc -f our > in any case, u

Re: Diff in Referencing Package

2003-09-30 Thread James Edward Gray II
On Tuesday, September 30, 2003, at 05:03 PM, [EMAIL PROTECTED] wrote: Any diff between MYPKG::hello(); and MYPKG->hello(); ? Yes. MYPKG::hello() is a standard subroutine call, targeting a definition for hello() found in MYPKG. You should rarely need this form as you would usually import need

Diff in Referencing Package

2003-09-30 Thread perl
Any diff between MYPKG::hello(); and MYPKG->hello(); ? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Should loops return a value?

2003-09-30 Thread Ville Jungman
From: "John W. Krahn" <[EMAIL PROTECTED]> You don't need a do block, the conditional operator can handle it. @udat{ 'x', 'y' } = $subs->anna_tilavuus( $x + $lisax, $y + $lisay, $z ) < 100 ? do { $subs->paivita( $x ); ( $lisax, $lisay ) } : $subs->anna_tilavuus( $

Re: Package variables allowed?

2003-09-30 Thread perl
Never mind, I figured it out by put add the $ infront like: > print $mystuff::a; > print $mystuff::b; Hope this help any newbies getting into package. -rkl > Can a calling program reference a package variable? > > It's not working for me. > > test.pl > --- > use fruit; > > #I want to use thi

Re: Should loops return a value?

2003-09-30 Thread Ville Jungman
But the analogy with return/last is likely to confuse -- why can you use retlast() in places where neither return() or last() make any sense? You are mainly right. I was perhaps too fast and careless when writing that example. Also return and retlast were just the first words that came in to my m

Re: vaiables global and local

2003-09-30 Thread perl
Does the use strict; impact the "my $x;" declaration any differently? What does "our $x;" do? in any case, usig the same variable name such as $x in the main and other sub would occur as a temporary place holder. However, I was curious on how to access the outer var in the sub whcih you desc with

Package variables allowed?

2003-09-30 Thread perl
Can a calling program reference a package variable? It's not working for me. test.pl --- use fruit; #I want to use this like a stub or struct #this does not work - it errored print mystuff::a; print mystuff::b; #this work mystuff::mixIt; fruit.pm -- package mixIt; $a="apple"; $b=

Re: vaiables global and local

2003-09-30 Thread david
[EMAIL PROTECTED] wrote: > How do you declare a var global versus local? It seems variables a local > and not static as in shell. That is, the sub does not see the vars from > the calling part. So, can someone modify the snipet to make it work? > > a.pl > -- > #my $x; any diff from the next l

RE: building module/package

2003-09-30 Thread Hanson, Rob
> The only configuration I know is > in /etc/httpd/conf.d/perl Yup, that looks like the one. > put this here? I think it would go right above (or below) the "Alias" line. Rob -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 3:1

RE: building module/package

2003-09-30 Thread perl
my redhat 9 is configured canned w/apache and mod_perl. The only configuration I know is in /etc/httpd/conf.d/perl: Alias /mp /var/www/mp SetHandler perl-script PerlHandler ModPerl::Registry::handler PerlOptions +ParseHeaders Options +ExecCGI put this here? setenv PERL5LI

Re: building module/package

2003-09-30 Thread perl
Thanks for your help. I had tried the use lib "path/to/module"; and use module; but it is still complaining about the use module part. However, I took the easy route but may annoy structured folks, like perl is very structured. I put it in /usr/lib/perl5/5.8.0 It works! Yippee! Perl programming i

RE: building module/package

2003-09-30 Thread Hanson, Rob
Besides the advice given below, there are a few other things you can do... To add the location of the Perl script to the lib path you can use this. The FindBin module finds your script, then sets $Bin to that location. use FindBin qw($Bin); use lib $Bin; Another way to do it is to set the enviro

Re: @ARGV

2003-09-30 Thread John W. Krahn
John Dillon wrote: > > According to > http://vipe.technion.ac.il/~shlomif/lecture/Perl/Newbies/lecture2/argv.html > the following program will do ...whatever (make a backup of files) and it > takes the file specified at the command line. I guessed from this that one > has a .pl file with the foll

Re: vaiables global and local

2003-09-30 Thread Daniel Staal
--On Tuesday, September 30, 2003 11:31 -0700 "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: How do you declare a var global versus local? It seems variables a local and not static as in shell. That is, the sub does not see the vars from the calling part. So, can someone modify the snipet to mak

Re: @ARGV

2003-09-30 Thread Steve Grazzini
On Tue, Sep 30, 2003 at 11:03:02AM +0100, Dillon, John wrote: > According to > http://vipe.technion.ac.il/~shlomif/lecture/Perl/Newbies/lecture2/argv.html > the following program will do ...whatever (make a backup of files) and it > takes the file specified at the command line. I guessed from this

Re: building module/package

2003-09-30 Thread Daniel Staal
--On Monday, September 29, 2003 23:53 -0700 "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: -I've sent this to the mod_perl list but there seems to be no response. I got the module working in the current directory executing on the command line. But I have a problem calling a module in my mod_per

vaiables global and local

2003-09-30 Thread perl
How do you declare a var global versus local? It seems variables a local and not static as in shell. That is, the sub does not see the vars from the calling part. So, can someone modify the snipet to make it work? a.pl -- #my $x; any diff from the next line? $x="abc"; doMe sub doMe { $x="xyz

[Thanks]: Re: Objects, threads and so on

2003-09-30 Thread david
Fernando wants to send the following thanks to all people who helped him on this topic and some explanation of what he really wants to do. He somehow sent it to myself only. #- forward message started -# Hello all, Thank you all for your attention. I'll answer here for

RE: Perl Newbie - Need good book recommendation

2003-09-30 Thread Perry, Alan
>> Big advice #2. Ebay. I buy all new books and expensive books through >> trusted sellers for about a 50-60% savings. Make sure you can pay media >> rate on the shipping. $4.00. I routinely buy books for $15-20 here. > >I do the same thing, and would add the following sites: > >http://www.ali

Re[2]: Objects, threads and so on

2003-09-30 Thread lists_perl_org
Hello all, (david, sorry if you receive this several times, I've had a hard time with the email client). Thank you all for your attention. I'll answer here for the three who wrote about this thread. The example David wrote is wonderful. I was missing ": shared". That was exactly what I wanted to

RE: Pattern matching username

2003-09-30 Thread Hanson, Rob
That isn't quite right, you may get better milage with this... # untested if ($z =~ /^[a-zA-Z_\-\.][\w\-\.]{2,}$/) { # is ok } else { # failed } Yours should also work, except that... 1. \s isn't needed in the first regex since a space would fail in the second regex anyway. 2. You need to s

Fw: Net::SCP::Expect

2003-09-30 Thread Jose Malacara
Sorry if this comes across twice. It bounced back the first time... Would someone mind telling me what I am doing wrong here please. I am trying to tie the SCP Expect module into a backup script I put together, but it keeps failing. I stripped out all but the SCP example code and it still gener

Pattern matching username

2003-09-30 Thread perl
Is this doing what it is suppose to and how efficient? rule - valid chars A-z0-9 _ - . - cannot start with a digit - cannot start with a space - must be greater than 3 in length sub isValidChars { my ($z) = @_; return length($z) > 3 && $z !~ /^[\d\s]/ && $z =~ /^[\w.]+$/ } thanks, -rkl --

RE: Is there a function to see if something is an element of an array?

2003-09-30 Thread Wiggins d'Anconia
On Tue, 30 Sep 2003 12:58:21 -0400, Dan Anderson <[EMAIL PROTECTED]> wrote: > I have a long list of IP addresses I am going to be reading in (using > regexps) and then seperating out into a list of IP addresses. I don't > want the IP addresses to

RE: Is there a function to see if something is an element of an array?

2003-09-30 Thread Paul Kraus
You could use a hash instead. Set the key to the ipvalue and the value to 1. If ($ips{$thisip}) { } HTH Paul -Original Message- From: Dan Anderson [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 12:58 PM To: [EMAIL PROTECTED] Subject: Is there a function to see if something

RE: Is there a function to see if something is an element of an a rray?

2003-09-30 Thread Hanson, Rob
> I don't want the IP addresses to be > printed if they are not unique. Unless you need to keep the ordering of the values you should use a hash like this. my %data; for (@list_of_ip) { $data{$_} = 1; } my @unique = keys %data; Rob -Original Message- From: Dan Anderson [mailto:[E

Is there a function to see if something is an element of an array?

2003-09-30 Thread Dan Anderson
I have a long list of IP addresses I am going to be reading in (using regexps) and then seperating out into a list of IP addresses. I don't want the IP addresses to be printed if they are not unique. Is there a way to check if a string already has an element in a stack? i.e. push @stack, $_ if i

RE: slice and dice them

2003-09-30 Thread Wiggins d'Anconia
On Mon, 29 Sep 2003 11:53:16 -0400, SilverFox <[EMAIL PROTECTED]> wrote: > can anyone tell me how I can remove the period at the end of each line > below?? > > . > . > . > . > Let's see if I can start a flame war ;-)... perldoc

Re: validate chars for a string

2003-09-30 Thread perl
can you add a check length into a oneliner but w/o the $_[0]? Also, is this correct and I guess to be consistent since the A-z test didn't have the explicit reference to $_[0].: sub isValidChars { return length($_[0]) > 4 && shift =~ /^[A-Za-z_.]+$/ } > On Sep 29, [EMAIL PROTECTED] said: > >>Sinc

Net::SCP::Expect

2003-09-30 Thread Jose Malacara
Would someone mind telling me what I am doing wrong here please. I am trying to tie the SCP Expect module into a backup script I put together, but it keeps failing. I stripped out all but the SCP example code and it still generates an error from the module. I verified my login, directory and fil

RE: Question on handling files.

2003-09-30 Thread Bob Showalter
Holeman, Douglas wrote: > Bob, > > Thank you for the help. If I may ask you one more question, how do I > modify the randbits on a w32 install or do I have to recompile the > source to get the number higher. It is 15 right now so it stalls at > about 32563. Any help would be appreciated. Doug, I

Re: slice and dice them

2003-09-30 Thread James Edward Gray II
On Monday, September 29, 2003, at 10:53 AM, SilverFox wrote: can anyone tell me how I can remove the period at the end of each line below?? Sure. Place your cursor at the end of each line in turn and push the "backspace" (or similar key) once... Oh, did you mean in Perl? ;) What part are you

Re: grep text by line....anyone pls?

2003-09-30 Thread Ramprasad A Padmanabhan
Nicholas Yau wrote: how to grep text by line? anyone can help to guide me. Please elaborate. No one can help you on such vague messages I think you are looking for some text in some lines , Better study more about regular expressions Just type in perldoc perlre Bye Ram -- To unsubscribe, e-mail

Re: who's the master????

2003-09-30 Thread Ramprasad A Padmanabhan
Silverfox wrote: hey guys, I'm trying to figure out how to stripe "Anything Else", "7:15pm" and "9:50pm" from the below html code. Any ides? Anything Else  (R, 108 min.)href=https://tickets.moviefone.com/ticketing/order.adp?movieid=16038&theaterid=757&showdate=20030929&showtime=1915&screenId=3

Recall: @ARGV

2003-09-30 Thread Dillon, John
Dillon, John would like to recall the message, "@ARGV". -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

@ARGV

2003-09-30 Thread Dillon, John
According to http://vipe.technion.ac.il/~shlomif/lecture/Perl/Newbies/lecture2/argv.html the following program will do ...whatever (make a backup of files) and it takes the file specified at the command line. I guessed from this that one has a .pl file with the following script, execute it at c: b

grep text by line....anyone pls?

2003-09-30 Thread Nicholas Yau
how to grep text by line? anyone can help to guide me. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: extending modules

2003-09-30 Thread Kevin Pfeiffer
In article <[EMAIL PROTECTED]>, Jeff 'Japhy' Pinyan wrote: > On Sep 29, Kevin Pfeiffer said: [...] >>My working copy is now called AliasFilePlus. >> >>What do I do with this if I try to share it? The changes to the module >>seemed too great (and too complex) for me to place them in the main >>prog

RE: How to draw lines with different line width?

2003-09-30 Thread Danny Miller
>I am usiing GD::Graph::lines to draw a graph with multiple lines. How do I >specify so that lines can be of different width? > >yi Set the line_width variable. E.g. line_width => [2] prints a thicker line than 1, etc... Danny - Do you Yahoo!? The New Yahoo! Sh

who's the master????

2003-09-30 Thread SilverFox
hey guys, I'm trying to figure out how to stripe "Anything Else", "7:15pm" and "9:50pm" from the below html code. Any ides? Anything Else  (R, 108 min.)https://tickets.moviefone.com/ticketing/order.adp?movieid=16038&theaterid=757&showdate=20030929&showtime=1915&screenId=3 >7:15pm | https://tic

RE: How do I query whether a toplevel window exists?

2003-09-30 Thread Robert Greenway
I found the answer! This is the routine I use to see if the checkbox value is 1 and then if a toplevel winodw exisits. The method Exists has to be capitalized. - sub do_assists if ($side_on == 0) {print "side on=$side_on\n"; if (Exi

slice and dice them

2003-09-30 Thread SilverFox
can anyone tell me how I can remove the period at the end of each line below?? . . . . -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: extending modules

2003-09-30 Thread Kevin Pfeiffer
In article <[EMAIL PROTECTED]>, Rob Dixon wrote: > Kevin wrote: >> >> >> I've updated the docs and wrote "...based on version >> xxx of Unix::AliasFile by Steve Snodgrass...", etc. > > Mister Snodgrass is a character in The Pickwick Papers > invented by Charles Dickens. He is no "Foo" or "Bar". >

Re: Perl Beginners Portals

2003-09-30 Thread Todd Wade
"Shlomi Fish" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Hi all! > > I believe learn.perl.org is very lacking: > > 1. Its design is ugly. > agreed > > 2. No links to many important online resources such as tutorials, books, > article collections, mailing lists, web forums, e