Variable "$q" will not stay shared at

2003-07-16 Thread B. Fongo
Hello, I'm working on my first Perl project. Most of my cgi programs work ok, but a look at the apache error log reveals this warning which is clear to me: Variable "$xy" will not stay shared at /data/www/cgi-perl/envir.pl line 19. [Wed Jul 16 11:44:57 2003] [error] Undefined subroutine &Apache

secure socket connection

2003-07-16 Thread mario kulka
I'm trying to set up credit card processing and one of the first steps is to establish a "secure socket connection" - how can i do it? (My host does support it) Thanks, Mariusz _ STOP MORE SPAM with the new MSN 8 and get 2 months FR

RE: Porting perl scripts on windows

2003-07-16 Thread Gupta, Sharad
Ok, Let me try to put it the other way. Any good books on how to learn perl on windows??. Thanx, -Sharad -Original Message- From: Gupta, Sharad Sent: Wednesday, July 16, 2003 12:41 PM To: [EMAIL PROTECTED] Subject: Porting perl scripts on windows Hello Friends, I have always been on

file changed??

2003-07-16 Thread Jose M.Herrera
I need to make a perl program which print "Changed!" when a file xx.txt is changed. please, any idea?? Thanks for all.. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Is there anyway to modify my bios clock by perl ?

2003-07-16 Thread LI NGOK LAM
Is there anyway to modify my BIOS clock by Perl ? and more, is there anyway to adjust my BIOS clock, so to sync. with other time servers ? TIA

RE: FTP to copy a file

2003-07-16 Thread Dan Muey
> > On Wed, 16 Jul 2003 16:49:40 -0500, [EMAIL PROTECTED] wrote: > > > > > > > On Wed, 16 Jul 2003 15:58:39 -0500, "Dan Muey" > <[EMAIL PROTECTED]> > > wrote: > > > > > > > > Howdy all, > > > >

RE: FTP to copy a file

2003-07-16 Thread wiggins
On Wed, 16 Jul 2003 15:58:39 -0500, "Dan Muey" <[EMAIL PROTECTED]> wrote: > > Howdy all, > > I've confirmed that my test script is choking on retr() > > I've confirmed that the file exists > > my $guts; > my $size = $ftp->size($file) > if(defin

Re: Sockets

2003-07-16 Thread John W. Krahn
"Jose M.Herrera" wrote: > > In the documentation of socket appears the fllowing: > $sockaddr = 'S n a4 x8' > > What means this??? That is a format string to be used with pack() and/or unpack() perldoc -f pack John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED

RE: FTP to copy a file

2003-07-16 Thread Dan Muey
Howdy all, I've confirmed that my test script is choking on retr() I've confirmed that the file exists my $guts; my $size = $ftp->size($file) if(defined $size) { my $retr = $ftp->retr($file); $retr->read($guts, $size); $retr->close(); $r .= "I am done trying to g

RE: trying out examples in Oreilly's Perl Graphics Programming

2003-07-16 Thread wiggins
Please don't top post... On Wed, 16 Jul 2003 13:11:57 -0700, "Joel Lopez" <[EMAIL PROTECTED]> wrote: > Hi, > > using this seems to get rid of the garbled stuff: > ./helloworld2 > output.png > > Is output.png supposed to be an existing image

Sockets

2003-07-16 Thread Jose M.Herrera
In the documentation of socket appears the fllowing: $sockaddr = 'S n a4 x8' What means this??? Thanks... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: FTP to copy a file

2003-07-16 Thread Dan Muey
> Hi Dan, > Howdy > I was trying to figure something like this a few months ago. > Needed to move a file to sub directory in the FTP server. All > in Net::FTP. > > Decided it wasn't worth figuring out. Instead I retrieved the > file locally, deleted the file on the server, cwd to the > pro

RE: FTP to copy a file

2003-07-16 Thread Levon Barker
Hi Dan, I was trying to figure something like this a few months ago. Needed to move a file to sub directory in the FTP server. All in Net::FTP. Decided it wasn't worth figuring out. Instead I retrieved the file locally, deleted the file on the server, cwd to the proper directory and then put it

RE: trying out examples in Oreilly's Perl Graphics Programming

2003-07-16 Thread Joel Lopez
Hi, using this seems to get rid of the garbled stuff: ./helloworld2 > output.png Is output.png supposed to be an existing image or is it one that is created on the fly? The code refers to the book authors home directory: my ($x1, $y1, $x2, $y2, $x3, $y3, $x4, $y4) = $image->stringFT

Socket::UNIX help

2003-07-16 Thread Cary Mathews
Background: I trying to write a perl wrapper script for the sophie virus scanning tool. For those unfamilier with sophie, it monitors a socket which programs can send pathnames for scanning. Upon virus detection, it returns the virus name; if no virus is found,

RE: Pulling modules from CPAN & installing

2003-07-16 Thread wiggins
On Wed, 16 Jul 2003 14:38:04 -0500, "JOHN FISHER" <[EMAIL PROTECTED]> wrote: > Been lurking for a bit. My first question. Please be kind. > > I was reading a reply from Janek about using Text::CSV, Text::CSV_XS to simplify > splits on comma file

VFS::Gnome Authentication

2003-07-16 Thread Joshua Colson
Does anyone have any pointers of where I might learn to use authentication (username/password) with VFS::Gnome? Any help would be appreciated. Also, please cc me, as I often miss the email from the list. Thanks. Joshua Colson signature.asc Description: This is a digitally signed message part

Porting perl scripts on windows

2003-07-16 Thread Gupta, Sharad
Hello Friends, I have always been on Unix and perl. Now i wanted to port some of my scripts to Windows. Any pointers to web/books for understanding the implications is appreciated?? TIA, -Sharad -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Help !!! on sockets

2003-07-16 Thread Pandey Rajeev-A19514
Hi, I am sorry to inform you so late. Actually, my subroutine "returned" before printing. Else everything was correct. Thanks for your help. Regards Rajeev -Original Message- From: Kipp, James [mailto:[EMAIL PROTECTED] Sent: Thursday, July 17, 2003 12:33 AM To: Pandey Rajeev-A19514; [E

Pulling modules from CPAN & installing

2003-07-16 Thread JOHN FISHER
Been lurking for a bit. My first question. Please be kind. I was reading a reply from Janek about using Text::CSV, Text::CSV_XS to simplify splits on comma files. I tried perl -e 'use Text::CSV'' ... and got ... === Can't locate Text/CSV.pm in @INC (@INC contains: /usr/lib/perl5/5.

RE: trying out examples in Oreilly's Perl Graphics Programming

2003-07-16 Thread wiggins
On 16 Jul 2003 11:28:31 -0700, Joel Lopez <[EMAIL PROTECTED]> wrote: > Hi, > > I have been trying to get this perl script to work, but I'm can't seem > to figure out why it's not working. You can see it here: > > http://shawn.apocabilly.org/PGP/

RE: Help !!! on sockets

2003-07-16 Thread Kipp, James
> When I print the @buffer outside the while loop , I am not > getting the output. > > Note : The commented line i.e. #print "Server: $_"; works and > prints all the lines read from the socket. > > Please somebody tell me what error have I been making. > > Regards > Rajeev >

Re: range operator for matching

2003-07-16 Thread Rob Dixon
"Steve Grazzini" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Wed, Jul 16, 2003 at 06:50:21PM +0200, Kevin Pfeiffer wrote: > > I found this in my "to do" directory (was this from perl.beginners - I don't > > remember and can't find it via Google). I tried the "line-range" opera

Re: subroutines

2003-07-16 Thread John W. Krahn
Stuart White wrote: > > Hello all, Hello, > I seem to be stuck on subroutines. I've read the Perl > for Beginners Wrox chapter on them, and I'm still a > bit lost. The first thing that you should read is the documentation supplied with Perl. The document describing subroutines is perlsub.pod.

Re: needing help with the or, || operators

2003-07-16 Thread John W. Krahn
Josh Corbalis wrote: > > I've been coding some basic programs learning perl and I'm having some > problems with the or operators. Here are a couple coding samples if anyone > knows what I'm doing wrong with this please tell me. > > #!/usr/bin/perl > $gimp=; > chomp ($gimp); > if ($gimp eq "gimp"

Help !!! on sockets

2003-07-16 Thread Pandey Rajeev-A19514
Hi , I have done a silly mistake which am not able to detect. Below is a subroutine, that takes the Socket_Handle and the Message as arguments. First i send the message and then I start reading the Socket in a while loop until DONE is detected. I am pushing each line in a @buffer. When I print

trying out examples in Oreilly's Perl Graphics Programming

2003-07-16 Thread Joel Lopez
Hi, I have been trying to get this perl script to work, but I'm can't seem to figure out why it's not working. You can see it here: http://shawn.apocabilly.org/PGP/examples/example2-1.txt When I run it I get this on my screen: [EMAIL PROTECTED] imagemagick]# ./helloworld2 Use of uninitialized

Re: newbie : obtain gid of the current user

2003-07-16 Thread John W. Krahn
Sylvain masnada wrote: > > Hi all, Hello, > I'd like to get a script which allows me to get the gid of the > user which is connected currently. > I've done this "script" which is not very useful for me because > I have to run it like this : > id | myscript.pl You could run id inside your perl p

Re: Creating html source ...

2003-07-16 Thread Rob Dixon
Jamie Risk wrote: > I have to assume that any of the simple HTML-izing I want to do > with simple text files has already been done. I'm guessing > modules, particularly "CGI" but would appreciate a directed pointer > to docs. > The question is? Rob -- To unsubscribe, e-mail: [EMAIL PROTECTE

quota's

2003-07-16 Thread Joe Stuart
I'm trying to implement quota's using the quota interface for perl. The problem I'm having is when I execute this code. #!/usr/bin/perl use Getopt::Std; use Quota; getopt("f:s:h:"); die "Usage: $0 -f -s -h \n" if(!$opt_f || !$opt_s || !$opt_h); open(PASS, "/etc/passwd") or die "Unabl

Creating html source ...

2003-07-16 Thread Jamie Risk
I have to assume that any of the simple HTML-izing I want to do with simple text files has already been done. I'm guessing modules, particularly "CGI" but would appreciate a directed pointer to docs. - Jamie -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: needing help with the or, || operators

2003-07-16 Thread royce . wells
In the below example you are saying if $gimp equals "gimp" or if "gimps". The First part of the if is actually testing values while the second part of the if statement is always true... therefore always printing working. you could try if ($gimp =~ /gimp/) { print "working"; } The

needing help with the or, || operators

2003-07-16 Thread Josh Corbalis
I've been coding some basic programs learning perl and I'm having some problems with the or operators. Here are a couple coding samples if anyone knows what I'm doing wrong with this please tell me. #!/usr/bin/perl $gimp=; chomp ($gimp); if ($gimp eq "gimp" || "gimps") { print "working"; }

Re: range operator for matching

2003-07-16 Thread Steve Grazzini
On Wed, Jul 16, 2003 at 06:50:21PM +0200, Kevin Pfeiffer wrote: > I found this in my "to do" directory (was this from perl.beginners - I don't > remember and can't find it via Google). I tried the "line-range" operator > here, but am wondering if it's possible with it to *not* catch the matching

range operator for matching

2003-07-16 Thread Kevin Pfeiffer
Hi, I found this in my "to do" directory (was this from perl.beginners - I don't remember and can't find it via Google). I tried the "line-range" operator here, but am wondering if it's possible with it to *not* catch the matching lines (i.e. only lines "3"-"4"). I suppose if you captured into

FW: search and count

2003-07-16 Thread bseel
I am a beginner to Perl. Well, I have a scenario like this. I have a pattern like VIOLATE in the file. So, I want to use the perl to search that pattern and see how many times it found such pattern. [Trimmed]. I am a beginner too but try this: my $count while my $filevar () { while ($fil

Regular Expressions and LWP

2003-07-16 Thread Ray Seals
I'm trying to write a program that will do a screen scrape of "WhatsUp Gold" using LWP. When it pulls the page down, I want to parse it and I'm looking for data between 2 tags. I'm having problems with parsing the variable $content. This variable holds the HTML of the page. When I run the progr

RE: FTP to copy a file

2003-07-16 Thread Dan Muey
> Howdy group, > > Any body have any suggestions on the best way to copy a file > with Net::FTP? > > I don't want to simply rename() a file as I want to keep the > existing one and create a new file that is the same. > > I know how to use stor() to use content in variables: > > my $stor = $

RE: Problems with Sockets

2003-07-16 Thread Kipp, James
> > use IO::Socket; > > $server_port = 514; > > $server = IO::Socket::INET -> new(LocalPort => $server_port, > Proto => "udp") > or die "Couldn't be a udp server on port $server_port : [EMAIL PROTECTED]"; > > while ($him = $server ->recv($datagram, 1024)) { > > ($portn

Re: Dollar signs in subroutines?

2003-07-16 Thread royce . wells
The dollar signs tells the subroutine how many arguments you are passing to the subroutine. Each $ is an argument. In the example you provided it will accept 2 arguments passed to it. "The right word may be effective, but no word was ever as effective as a rightly timed pause."

Dollar signs in subroutines?

2003-07-16 Thread Rob Richardson
Greetings! In the "subroutines" thread, the original poster declared his FoulParser subroutine with this line: > > sub FoulParser($); Then, Steve Grazzini suggested that subroutines might look like: > sub foo ($$) { > my ($first, $second) = @_; > } What do the dollar signs mean? I'v

newbie : obtain gid of the current user

2003-07-16 Thread Sylvain Masnada
Hi all, I'd like to get a script which allows me to get the gid of the user which is connected currently. I've done this "script" which is not very useful for me because I have to run it like this : id | myscript.pl My script is : while(<>) { if(/^uid=\d+.\w+.\sgid=(\d+)/) { $g

Problems with Sockets

2003-07-16 Thread Ruben Montes
Hello, I have developed an UDP server and I need to know the ip address of the remote peer. This is the code: use IO::Socket; $server_port = 514; $server = IO::Socket::INET -> new(LocalPort => $server_port, Proto => "udp") or die "Couldn't be a udp server on port $server_port : [EMAIL PROTECTED]

Net:FTP to copy a file

2003-07-16 Thread Dan Muey
Howdy group, Any body have any suggestions on the best way to copy a file with Net::FTP? I don't want to simply rename() a file as I want to keep the existing one and create a new file that is the same. I know how to use stor() to use content in variables: my $stor = $ftp->stor("copyoforig.txt

Re: subroutines

2003-07-16 Thread Steve Grazzini
On Wed, Jul 16, 2003 at 07:50:56AM -0700, Stuart White wrote: > I seem to be stuck on subroutines. Okay, let's have a look; > # > # Subroutine prototypes > > > sub FoulParser($); > > # > # Main Program

subroutines

2003-07-16 Thread Stuart White
Hello all, I seem to be stuck on subroutines. I've read the Perl for Beginners Wrox chapter on them, and I'm still a bit lost. My problem is passing a scalar to a subroutine, doing calculations therein, and then returning a value; or basically, subroutines in general. I started out with a simpl

RE: help needded

2003-07-16 Thread wiggins
On 16 Jul 2003 12:07:23 -, "vemulakonda uday bhaskar" <[EMAIL PROTECTED]> wrote: > hi all > > i have installed the Net::SFTP module along with all its > prerequisite modules.. > As I said before you need to help us to help you. Re-posting th

Re: Regular Expression

2003-07-16 Thread Janek Schleicher
Nick Diel wrote at Tue, 15 Jul 2003 11:12:18 -0600: > I am having a hard time getting a regular expression to work the way i want > it to. Take the following text: bla bla bla (la la) bla bla (di da) > > I want to extract the la la to one variable and di da to antoher variable. > What I have tr

RE: starting off

2003-07-16 Thread Perry, Alan
Paul D. Kraus wrote: > >> need any tips as to start perl programming , so if you could help i would >really appreciate it . Iam really good with batch file programming , anda >bit > of C++ so if any help could be shot this way i would make it worth >your while ;D > >http://www.amazon.com/exec/obido

Re: help needded

2003-07-16 Thread mgoland
- Original Message - From: vemulakonda uday bhaskar <[EMAIL PROTECTED]> Date: Wednesday, July 16, 2003 8:07 am Subject: help needded > hi all Hi > > i have installed the Net::SFTP module along with all its > prerequisite modules.. Have you installed the correct version of ssh ?? > >

help needded

2003-07-16 Thread vemulakonda uday bhaskar
hi all i have installed the Net::SFTP module along with all its prerequisite modules.. my code : #!/usr/bin/perl use Net::SFTP: use strict; use warnings; my $host="xxx.xxx.xxx.xxx"; my $user="xxx"; my $password="xxx"; my $proto="sftp"; my $hp=Net::SFTP->new("host",user=>"$user",password=>"$p

RE: search and count

2003-07-16 Thread Boon Chong Ang
Marcos, Thanks a lot! Best regards, ABC -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 16, 2003 4:36 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: search and count call this script like perl script.pl File_name.txt perl script.pl <

RE: search and count

2003-07-16 Thread Marcos . Rebelo
call this script like perl script.pl File_name.txt perl script.pl < File_name.txt more File_name.txt | perl script.pl my $count=0; while (<>){ $count++ if /VIOLATE/; } print $count; Must work -Original Message- From: Boon Chong Ang [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 16,

search and count

2003-07-16 Thread Boon Chong Ang
Hi, I am a beginner to Perl. Well, I have a scenario like this. I have a pattern like VIOLATE in the file. So, I want to use the perl to search that pattern and see how many times it found such pattern. For example VIOLATE ABC ABC ABC VIOLATE ABC VIOLATE [in the same row and so I want it

Re: Regular Expression

2003-07-16 Thread Kevin Pfeiffer
In article <[EMAIL PROTECTED]>, Paul D. Kraus wrote: >> I am having a hard time getting a regular expression to work the way i > want >> it to. Take the following text: bla bla bla (la la) bla bla (di da) > > my ( $var1, $var2 ) = ( $1, $2 ) if /$inputstring =~ m/bla bla bla (la la) > bla bla (d

RE: Getting the domain name

2003-07-16 Thread Kevin Pfeiffer
In article <[EMAIL PROTECTED]>, Mark Anderson wrote: >> We have a fairly simple redirect script a url is entered, and even tho > there are >> directions to not enter the "http://www"; sometimes we get it or > "http://";... >> what is the simplest method to extract just the domain name if a >> "ht