cgi error

2003-08-15 Thread David Glucksman
Hello everyone, I am new to Perl and CGI so I need some help. I have a simple cgi script: #!/usr/bin/perl print Content-type: text/html\n\n; print This is my first CGI application; I save the script using the .cgi nameing convention. I can run the script from unix with no errors but when I

RE: cgi error

2003-08-15 Thread Hanson, Rob
The message you see in the browser usually means very little, and doesn't help much. Check your web server's error logs to see the real error. If you are getting that error you can be pretty sure that your web server is at least trying to execute the script. So after checking your logs, I would

Invoke DUN on Win XP

2003-08-15 Thread Sunish Kapoor
Hi, I wish to invoke DUN on my WIN XP to send email via a Perl Module. Can anyone help please..? Thanks Regards Sunish

RE: quick re help

2003-08-15 Thread Robert J Taylor
what is less awkward than [\s|\S] for 'match anything?' . Yes -.- Dot, period, point, et al, is the universal match something symbol. So, m'.*$' matches everthing on a line. If you want to match a period you can either escape it: \. or bracket it [.]. Escaping is better for

Re: Quite day

2003-08-15 Thread Jenda Krynicky
From: Dan Muey [EMAIL PROTECTED] All I hear are crickets on the list anybody there today? Hey I aint no cricket ;-) I'd like to have a simple spider that will look at a url's diretcory and simply give me a list of files in that directory. IE my $files = ?

Telnet.pm

2003-08-15 Thread Vidal, Christopher, SOLCM
The group helped me to get this small snippet working .. and it works good for when I need to telnet to multiple and/or all servers. #! /opt/perl5/bin/perl # example using Telnet.pm to servers require 'Telnet.pm'; # script server ip username password $t = new Net::Telnet Timeout = 5,

RE: California ballot sort algorithm?

2003-08-15 Thread KEVIN ZEMBOWER
Yep, works. Thanks for showing an alternate way without using the tr/// trick. Now to go through it character by character to try to understand it... Thanks, again, Bob. -Kevin Bob Showalter [EMAIL PROTECTED] 08/14/03 10:39AM KEVIN ZEMBOWER wrote: Here's a sure sign of someone with too much

Win32 registry

2003-08-15 Thread Saadat Saeed
Hello, I am new to scripting (in general) and am an administrator of win32 based systems. I am deciding between Perl a number of other scripting technologies to standardise upon. The only thing that'll convince me for now is the abiltity to read and modify registries of machines connected over

RE: California ballot sort algorithm?

2003-08-15 Thread Bob Showalter
KEVIN ZEMBOWER wrote: Yep, works. Thanks for showing an alternate way without using the tr/// trick. Now to go through it character by character to try to understand it... Don't get the idea it's a *good* way, by any means :~) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

problems with net:SNMP install

2003-08-15 Thread Schubert, John [NTWK SVCS]
I've been trying to install the net:SNMP Perl module and have been having problems. We got Net:SNMP from SunFreeware.com and added that package, then unpacked and tried to install the perl mods for net:SNMP from Sourceforge.com.They both installed ok. However, when running a perl script

Re: i need help accessing a hash

2003-08-15 Thread Rob Dixon
Wiggins D'Anconia wrote: Jerry Preston wrote: Hi! I have the following hash: %layout = ( hotspots = { JERRY = [ { '_DIMENSION' = [ 'width', 'height' ] }, {

Re: Read only variabls

2003-08-15 Thread Rob Dixon
Jenda Krynicky wrote: Well at least it would not be using 'local' the way it does use it now. 'temporary' or something would make more sense. Local versus lexical variables are a big source of confusion :-( Agreed. I'd vote for 'our local'. /R -- To unsubscribe, e-mail: [EMAIL PROTECTED]

LWP: Forms Submissions

2003-08-15 Thread Sukrit K Mehra
Hi listers, This is the code of the form. From the website www.m-w.com; for which I am trying to make a client. form name=dict method=post action=/cgi-bin/dictionary td valign=middle width=223 align=center input type=hidden name=book value=Dictionary font color=#ff size=2 face=Arial,

RE: LWP: Forms Submissions

2003-08-15 Thread wiggins
On Fri, 15 Aug 2003 22:29:46 +0530, Sukrit K Mehra [EMAIL PROTECTED] wrote: Hi listers, This is the code of the form. From the website www.m-w.com; for which I am trying to make a client. form name=dict method=post

Re: i need help accessing a hash

2003-08-15 Thread wiggins
On Fri, 15 Aug 2003 17:48:13 +0100, Rob Dixon [EMAIL PROTECTED] wrote: Hi guys. There's no need for '-' between successive parentheses. Or for quotes around all 'word' ( !~ /\W/ ) hash keys. $hotspots-{JERRY}{cell_center}[0] ==

Modification of a read-only value attempted

2003-08-15 Thread Scott Taylor
Hello all, I'm trying to open a file (3 separate files anyway) and iterate through them In this portion of my script: foreach (dct,lfl,usa){ my ($co_id) = $_; print $co_id\n; system rcp orion:/u1/syncdata/drvdat.$co_id /tmp/drv.temp || next; open(InFile, /tmp/drv.temp) || die No such

RE: Modification of a read-only value attempted

2003-08-15 Thread Bob Showalter
Scott Taylor wrote: Hello all, I'm trying to open a file (3 separate files anyway) and iterate through them In this portion of my script: foreach (dct,lfl,usa){ my ($co_id) = $_; print $co_id\n; system rcp orion:/u1/syncdata/drvdat.$co_id /tmp/drv.temp || next;

RE: Modification of a read-only value attempted

2003-08-15 Thread Scott Taylor
At 12:45 PM 08/15/2003, Bob Showalter wrote: Scott Taylor wrote: Hello all, I'm trying to open a file (3 separate files anyway) and iterate through them In this portion of my script: foreach (dct,lfl,usa){ my ($co_id) = $_; print $co_id\n; system rcp

Check my script

2003-08-15 Thread Keith Olmstead
Hello, I have this script to gzip logs in different directories. Can some one check it for me. It works fine, but I want to make sure I did it correctly and the best way. BTW, this is my frist script that I wrote. Thanks, Keith Olmstead #!/usr/bin/perl my $startdir = /opt/log/hosts/; use

Case conversions

2003-08-15 Thread Scott Taylor
Any one have or know of a function to convert ugly NAME, USER to User Name? TIA Scott. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Case conversions

2003-08-15 Thread James Edward Gray II
On Friday, August 15, 2003, at 04:20 PM, Scott Taylor wrote: Any one have or know of a function to convert ugly NAME, USER to User Name? Maybe something like: s/^(\w+), ?(\w+)$/ucfirst(lc $2) . ' ' . ucfirst(lc $1)/e Hope that helps. James -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Case conversions

2003-08-15 Thread Elias Assmann
On Fri, Aug 15, 2003 at 02:20:19PM -0700, Scott Taylor wrote: Any one have or know of a function to convert ugly NAME, USER to User Name? $ perl -le '$_ = NAME; s/(.)(.*)/$1\L$2/; print' Name The function to convert a string to lower case is lc. HTH, Elias -- If you take the

RE: Case conversions

2003-08-15 Thread Degey, Didier
$var = 'NAME, USER'; print $var\n; @var = reverse split(', ',$var); print @var\n; $var = join(' ',(ucfirst lc $var[0],ucfirst lc $var[1])); # whitout the comma this time print $var\n; -Original Message- From: Scott Taylor [mailto:[EMAIL PROTECTED] Sent: vendredi 15 août 2003 23:20 To:

RE: Case conversions

2003-08-15 Thread Mark Anderson
Any one have or know of a function to convert ugly NAME, USER to User Name? timtowtdi: $str = User Name if ($str eq NAME, USER); $str =~ s/^NAME, USER$/User Name/; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Case conversions

2003-08-15 Thread Jerry Rocteur
I've just used Elias' idea to change a file's content... Where file name is word: perl -i -p -e 's/(.)(.*)/$1\L$2/' word On Friday, Aug 15, 2003, at 23:29 Europe/Brussels, Elias Assmann wrote: On Fri, Aug 15, 2003 at 02:20:19PM -0700, Scott Taylor wrote: Any one have or know of a function to

Re: Case conversions

2003-08-15 Thread Scott Taylor
At 02:28 PM 08/15/2003, James Edward Gray II wrote: On Friday, August 15, 2003, at 04:20 PM, Scott Taylor wrote: Any one have or know of a function to convert ugly NAME, USER to User Name? Maybe something like: s/^(\w+), ?(\w+)$/ucfirst(lc $2) . ' ' . ucfirst(lc $1)/e Nice, very useful! Only

scalar reference in hash

2003-08-15 Thread Fred. Oger
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I have a small question about using a scalar reference contained in a hash : Here's an example : $a=5; %zzz = { v = \$a}; $b=$zzz-{v}; print Before A: $a\tB: $$b\n; $$b++; print After A: $a\tB: $$b\n; this code prints : Before A: 5B:

Re: Check my script

2003-08-15 Thread James Edward Gray II
On Friday, August 15, 2003, at 04:16 PM, Keith Olmstead wrote: Hello, Howdy. I have this script to gzip logs in different directories. Can some one check it for me. It works fine, but I want to make sure I did it correctly and the best way. I think it's excellent that you want a review of

RE: Case conversions

2003-08-15 Thread Scott Taylor
At 02:46 PM 08/15/2003, Degey, Didier wrote: -Original Message- From: Scott Taylor [mailto:[EMAIL PROTECTED] Sent: vendredi 15 août 2003 23:20 To: [EMAIL PROTECTED] Subject: Case conversions Any one have or know of a function to convert ugly NAME, USER to User Name? Strange email thingy

Re: Case conversions

2003-08-15 Thread James Edward Gray II
On Friday, August 15, 2003, at 04:55 PM, Scott Taylor wrote: At 02:28 PM 08/15/2003, James Edward Gray II wrote: On Friday, August 15, 2003, at 04:20 PM, Scott Taylor wrote: Any one have or know of a function to convert ugly NAME, USER to User Name? Maybe something like: s/^(\w+),

Re: Case conversions

2003-08-15 Thread James Edward Gray II
On Friday, August 15, 2003, at 05:09 PM, Scott Taylor wrote: $var = 'NAME, USER'; print $var\n; @var = reverse split(', ',$var); print @var\n; $var = join(' ',(ucfirst lc $var[0],ucfirst lc $var[1])); # whitout the comma this time print $var\n; This works well, too, and join seems to fix the

Re: Case conversions

2003-08-15 Thread Randal L. Schwartz
Scott == Scott Taylor [EMAIL PROTECTED] writes: Scott Any one have or know of a function to convert ugly NAME, USER to User Name? s/NAME, USER/User Name/; :-) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED]

Re: Check my script

2003-08-15 Thread John W . Krahn
On Friday 15 August 2003 14:16, Keith Olmstead wrote: Hello, Hello, I have this script to gzip logs in different directories. Can some one check it for me. It works fine, but I want to make sure I did it correctly and the best way. If it works then it must be correct! :-) As to the best

Perl script to ssh to other machine.

2003-08-15 Thread Titu Kim
Hi, I am newbie in Perl. I would like to use a perl script to ssh to multiple linux machines to execute uptime command. THen i need to get the result of 'uptime' and analyse them. How can it do this? Thanks. __ Do you Yahoo!? Yahoo! SiteBuilder - Free,

Re: Perl script to ssh to other machine.

2003-08-15 Thread Wiggins d'Anconia
Titu Kim wrote: Hi, I am newbie in Perl. I would like to use a perl script to ssh to multiple linux machines to execute uptime command. THen i need to get the result of 'uptime' and analyse them. How can it do this? You may want to use a networked uptime server or the like instead, but if you

Re: Check my script

2003-08-15 Thread Jeff 'japhy' Pinyan
On Aug 15, Keith Olmstead said: foreach $log (@logfile) { find (\eachFile, $startdir); } # End for loop sub eachFile { if (-e $_ $_ =~ /$log$/) { push @log, $File::Find::name;} } # End eachFile Everyone has been telling you to use strict, and scope the $log variable, but no one has run

Re: scalar reference in hash

2003-08-15 Thread Jeff 'japhy' Pinyan
On Aug 15, Fred. Oger said: $a=5; %zzz = { v = \$a}; WARNING! WARNING! At least, that's what you would have heard if you had turned warnings on in your program. You've used curly braces {...} here, which creates a hash reference. You don't want a hash reference. You wanted to use

Re: Check my script

2003-08-15 Thread John W . Krahn
On Friday 15 August 2003 19:09, Jeff 'japhy' Pinyan wrote: Everyone has been telling you to use strict, and scope the $log variable, but no one has run the code they've corrected, or they'd spot that scoping $log in the for loop makes in NOT visible in the eachFile() function. Here's a

Re: Linux, Perl, [open,star]office

2003-08-15 Thread R. Joseph Newton
Note: I know the thread is a bit old, but the usefulness of CSV for file transfer has a pretty general applicability. So here goes... McMahon, Christopher x66156 wrote: -Original Message- From: Paul Kraus [mailto:[EMAIL PROTECTED] Sent: Friday, June 27, 2003 9:56 AM To: [EMAIL