cgi post and get ??

2003-03-29 Thread jdavis
hello, I have a perl/cgi scrip that Im trying to link to and pass a var like so.. the page im linking from has a that gets filled in by a user. Prima Gallery, the s name is 'content'. SO the_prima.cgi scrip has a if loop to determine the instance to use. In this case Im calling instance

Re: print function? -> part 3

2003-03-29 Thread Rob Dixon
Jasmine wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > sorry its typo error in this email. My original code is printing $dstip.It > will work if i put it on two separate lines. > print "$srcip \n"; > print "$dstip \n"; > but i dont want it to be this way.. i want perl to print them si

print function? -> part 3

2003-03-29 Thread Jasmine
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 sorry its typo error in this email. My original code is printing $dstip.It will work if i put it on two separate lines. print "$srcip \n"; print "$dstip \n"; but i dont want it to be this way.. i want perl to print them side by side. On Sunday 30 M

Re: print function? -> part 2

2003-03-29 Thread Rob Dixon
Jasmine wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > i tested out to print $dstip alone.. and it works. $dstip does has a value. Jasmine. I think you may simply be printing out the wrong variable. Your original code has: if ($A1 != 111 || $B1 != 222 || $C1 != 333) {

print function? -> part 2

2003-03-29 Thread Jasmine
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 i tested out to print $dstip alone.. and it works. $dstip does has a value. On Sunday 30 March 2003 05:23, you wrote: > Jasmine wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > hi > > > > I dont understand exactly how does the prin

Re: print function?

2003-03-29 Thread Wiggins d'Anconia
Jasmine wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi I dont understand exactly how does the print function work. I have a script that keeps complaining: Use of uninitialized value in concatenation (.) or string at ./report.pl line 33. when i put -> print "$srcip $dstip \n"; This me

Re: Variable scoping, static variable

2003-03-29 Thread R. Joseph Newton
"R. Joseph Newton" wrote: > Sorry, the function I proposed [see bottom] did not properly enclose the > declaration, and thus would not have provided the protection I referred to.. Should > have been: > test_cache(); > sub test_cache { > my $cache = {}; > > &test("hello0",$cache); > &test(

Re: Net::Ping Cannot redirect output !

2003-03-29 Thread R. Joseph Newton
Rob Dixon wrote: > R. Joseph Newton wrote: > > > > > $p->bind("192.168.2.211"); # Specify source interface of pings [with no my or > > > our] > > But it's a method call on an existing object ;-) Oops, my bad. cited the wrong line--should have been: $p = Net::Ping->new("icmp"); and this may eve

print function?

2003-03-29 Thread Jasmine
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi I dont understand exactly how does the print function work. I have a script that keeps complaining: Use of uninitialized value in concatenation (.) or string at ./report.pl line 33. when i put -> print "$srcip $dstip \n"; But the script works wh

Re: Newbie Help Needed! Mail Problem!

2003-03-29 Thread R. Joseph Newton
Palm Optins wrote: > Hello All. > > I have a admin script for a protected members area. In it, I can email all the > members > to let them know the Updates of the program. > > For some unknown reason, it keeps sending out double emails for each address. > Can someone tell me what I did wrong? > >

Re: perl help!!

2003-03-29 Thread John W. Krahn
Jasmine wrote: > > hi Hello, > i m faced with a problem. > > i have a string set to an IP address and i want to be able to compare it with > just the first three octets and see if it matches. How do i go about? > I know regex can do it but the problem is i m a newbie to it. If anyone can > figu

Re: Array sorting (yet another trains question)

2003-03-29 Thread John W. Krahn
Rob Richardson wrote: > > --- Peter Scott <[EMAIL PROTECTED]> wrote: > > > > (2) If you want to sort the keys of a hash, there's no need to put > > them into an array. sort takes a list as input: > > > > return sort { $a->GetCrewCall cmp $b->GetCrewCall } keys %self > > Since I am not usin

Re: db query help! -> part 2

2003-03-29 Thread R. Joseph Newton
Jasmine wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi thanks .. for telling me tht DBI dont accept $! > erm i still have problems though. Theres actually data in the this table made > up of 2 columns. But, apparently my query keep returning "0" and "new" which > I cant understand

Re: Array sorting (yet another trains question)

2003-03-29 Thread Wiggins d'Anconia
Rob Richardson wrote: (1) If you wanted to put the keys of a hash into an array, just do it all at once: @temp = keys %$self I am not putting the keys of the hash into the temporary array. I'm putting the values of the hash into the array. In that case, perldoc -f values, 'values' does the s

Re: grab input from a stdout

2003-03-29 Thread R. Joseph Newton
Leon wrote: > Hi again, > > I have a questions regarding stdout. > > Basically I have a script that looks like this: > > system("reg DELETE HKCR\\AppID\\OvEpSeMain.EXE /f") && die "no $!"; Hi Leon, So this works on your system? What system are you running? On Win 2K, I get the error: 'reg' is

RE: perl help!!

2003-03-29 Thread yargo
Simple: #!/perl my $IP_Address = "123.456.789.000"; my $Other_IP = "123.456.789.001"; # or STDIN or whatever. my ($A1, $B1, $C1, $D1) = (split /\./, $IP_Adress); my ($A2, $B2, $C2, $D2) = (split /\./, $Other_IP); if ($A1 == $A2 && $B1 == $B2 && $C1 == $C2) { print "IP confirmed"; } else

Re: $from_address

2003-03-29 Thread Robbie Staufer
Thanks to all for your help with the $from address thing. Removing the single quotes did the trick. Robbie R. Joseph Newton wrote: Robbie Staufer wrote: Hi, I have a perl script that takes in form data and generates and email with the data to be sent to me. I'm getting the error message

Re: Grabbing from a string

2003-03-29 Thread Rob Dixon
Wiggins D'Anconia wrote: > [EMAIL PROTECTED] wrote: > > How can I grabb the browser name Opera and the version number from a string, > > when it's very important that I get the whole version number. For example: > > > > Windows XP) Opera 6.05 [en] > > > > or > > > > MSIE 6.0; MSIE 5.5; Windows NT

perl help!!

2003-03-29 Thread Jasmine
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi i m faced with a problem. i have a string set to an IP address and i want to be able to compare it with just the first three octets and see if it matches. How do i go about? I know regex can do it but the problem is i m a newbie to it. If anyone c

Re: Array sorting (yet another trains question)

2003-03-29 Thread Rob Richardson
Peter, Thanks for your reply. My responses are in-line below. Rob --- Peter Scott <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (Rob Richardson) writes: > >sub GetTrainsByTime > >{ > > my $self = shift; > > my @result; > > my @temp; > > my $a

Re: Grabbing from a string

2003-03-29 Thread Wiggins d'Anconia
[EMAIL PROTECTED] wrote: How can I grabb the browser name Opera and the version number from a string, when it's very important that I get the whole version number. For example: Windows XP) Opera 6.05 [en] or MSIE 6.0; MSIE 5.5; Windows NT 5.1) Opera 7.0 [en] Can anyone show me the best way to

Re: Array sorting (yet another trains question)

2003-03-29 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Rob Richardson) writes: >Greetings! > >In the train schedule program that you are all probably heartily sick >of by now, I have added a ScheduleDay class that represents all trains >running on a given day. It has a method that returns an array of

Array sorting (yet another trains question)

2003-03-29 Thread Rob Richardson
Greetings! In the train schedule program that you are all probably heartily sick of by now, I have added a ScheduleDay class that represents all trains running on a given day. It has a method that returns an array of references to all of the Train objects for that day. I want to sort those train

MAil Problem! Help Needed

2003-03-29 Thread Palm Optins
Hello All. I have a admin script for a protected members area. In it, I can email all the members to let them know the Updates of the program. For some unknown reason, it keeps sending out double emails for each address. Can someone tell me what I did wrong? Here's the code I used for the mailer

Re: $|

2003-03-29 Thread Rob Dixon
Janek Schleicher wrote: > Dan wrote at Sat, 29 Mar 2003 10:20:33 +: > > > Just a quick question, what is the meaning of this $| and what is it > > supposed to do? > > From > perldoc perlvar > >$| If set to nonzero, forces a flush right away and >after every write or

Re: Grabbing from a string

2003-03-29 Thread Rob Dixon
[EMAIL PROTECTED] wrote: > How can I grabb the browser name Opera and the version number from a string, > when it's very important that I get the whole version number. For example: > > Windows XP) Opera 6.05 [en] > > or > > MSIE 6.0; MSIE 5.5; Windows NT 5.1) Opera 7.0 [en] > > Can anyone show me

Re: Grabbing from a String

2003-03-29 Thread Stefan Lidman
[EMAIL PROTECTED] wrote: > > In a message dated 3/29/03 7:16:57 AM Eastern Standard Time, > [EMAIL PROTECTED] writes: > > > > This returns 4. I need the Opera 7.0 to be in $browser. > > > > my $string = 'Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT > > 5.1) Opera 7.0 [en]'; > > > > my

Re: Strange question...

2003-03-29 Thread Rob Dixon
Gregg wrote: > > I have a debug log subroutine that I copy and paste into different > > Perl modules as I am working on them. It occurred to me that it would > > be very useful to log the line numbers to the file as a better means > > of keeping track of what a script is doing, and finding the loc

Re: Grabbing from a String

2003-03-29 Thread Jimstone77
In a message dated 3/29/03 7:16:57 AM Eastern Standard Time, [EMAIL PROTECTED] writes: > > This returns 4. I need the Opera 7.0 to be in $browser. > > my $string = 'Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT > 5.1) Opera 7.0 [en]'; > > my ($browser) = $string =~ /(\w+\s*[\d.

Re: Net::Ping Cannot redirect output !

2003-03-29 Thread Rob Dixon
R. Joseph Newton wrote: > > > $p->bind("192.168.2.211"); # Specify source interface of pings [with no my or our] But it's a method call on an existing object ;-) /R -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Strange question...

2003-03-29 Thread Stefan Lidman
gregg wrote: > > > I have a debug log subroutine that I copy and paste into different > > Perl modules as I am working on them. It occurred to me that it would > > be very useful to log the line numbers to the file as a better means > > of keeping track of what a script is doing, and finding the

Re: $|

2003-03-29 Thread Janek Schleicher
Dan wrote at Sat, 29 Mar 2003 10:20:33 +: > Just a quick question, what is the meaning of this $| and what is it > supposed to do? From perldoc perlvar $| If set to nonzero, forces a flush right away and after every write or print on the currently se

$|

2003-03-29 Thread dan
Hi Just a quick question, what is the meaning of this $| and what is it supposed to do? Thanks in advance. Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Strange question...

2003-03-29 Thread gregg
I have a debug log subroutine that I copy and paste into different Perl modules as I am working on them. It occurred to me that it would be very useful to log the line numbers to the file as a better means of keeping track of what a script is doing, and finding the location using the vi edito

Re: $from_address

2003-03-29 Thread R. Joseph Newton
Robbie Staufer wrote: > Hi, > > I have a perl script that takes in form data and generates and email > with the data to be sent to me. I'm getting the error message > Error:Bad or missing From address: '$from_address'. The webmaster says > I'm using the correct from address, so, any ideas about

Grabbing from a string

2003-03-29 Thread Jimstone77
How can I grabb the browser name Opera and the version number from a string, when it's very important that I get the whole version number. For example: Windows XP) Opera 6.05 [en] or MSIE 6.0; MSIE 5.5; Windows NT 5.1) Opera 7.0 [en] Can anyone show me the best way to place Opera and the who

Re: :Ping Cannot redirect output !

2003-03-29 Thread R. Joseph Newton
"Bakken, Luke" wrote: > > $!=1; > > $! contains error text, if I remember correctly off the top of my head. > > Use $| = 1 instead for autoflush. This shouldn't cause redirect > problems, tho. > > > use Net::Ping; > > @host_array = ; > > $p = Net::Ping->new("icmp"); > > $p->bind("192.168.2.211");

Re: Net::Ping Cannot redirect output !

2003-03-29 Thread R. Joseph Newton
Ramprasad wrote: > I cant beleive this , it seems so impossible can anyone help me I can. You ae not using strict. > ... > @host_array = ; # no my > $p = Net::Ping->new("icmp"); # no my > $p->bind("192.168.2.211"); # Specify source interface of pings [with no my