Re: select multiple

2003-07-11 Thread Chris Faust
CGI.pm does the trick for me, the multi values are seperated by \0 select name=yadda multi optionyadda1 optionyadda2 optionyadda3 /select my $CGI = new CGI(); %form_data = $CGI-Vars; @options = split(\0,$form_data{'yadda'}); $options[0] = yadda1, $options[1] = yadda2 etc . Not usable

Re: Net::FTP

2003-07-11 Thread Gregg R . Allen
If you don't mind escaping to the shell, this is how I get a list of files I want to ftp. #This returns a list of files to be ftp'ed my $files = `ls`; #turn the files variable into an array of file names. my @ftpfiles = split(/\n/ , $files); Sincerely, Gregg R. Allen I.T. Specialist Lexington

Re: Net::FTP

2003-07-11 Thread wiggins
Please don't top post. On Thu, 10 Jul 2003 18:42:45 -0600, Gregg R. Allen [EMAIL PROTECTED] wrote: If you don't mind escaping to the shell, this is how I get a list of files I want to ftp. #This returns a list of files to be ftp'ed my

md5

2003-07-11 Thread Alexander Blüm
hello I ran into an odd problem, that I cannot explain to myself... I use mod_perl 1.27 and apache 1.3.27... the commandline script works perfectly: perl -mDigest::MD5 -we 'print new Digest::MD5-md5_hex(lol).\n' returns fe5608e20902819328733f5e672b6af6 each time I run the script. ok... I added

Re: checkbox label font

2003-07-11 Thread Curt
Sawsan Sarandah wrote: Greetings, In a checkbox form, how can I change the font attribute for the label text below to Arial instead of the default? $cgi-checkbox(-name='checkboxname',-value='turned on',-label=I want Arial here); As far as I know the label is not part of the checkbox,

cookie expiration time problem

2003-07-11 Thread Sawsan Sarandah
Greetings, I have a small problem. When I create a cookie using cgi.pm, the expiration date is always three hours behind the actual time. In other words, the following code snipet: # Time on my local machine: 10:00 pm # Rhat Linux server using date command: Fri Jul 11 21:59:44 IDT 2003 # hwclock

Re: cookie expiration time problem

2003-07-11 Thread Ramon Chavez
I'm not so experience using cookies with cgi but. have you ever tried using single quotes?? '+4h' Hope it helps. -rm- - Original Message - From: Sawsan Sarandah [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 11, 2003 3:13 PM Subject: cookie expiration time problem

RE: cookie expiration time problem

2003-07-11 Thread Bob Showalter
Sawsan Sarandah wrote: Greetings, I have a small problem. When I create a cookie using cgi.pm, the expiration date is always three hours behind the actual time. In other words, the following code snipet: # Time on my local machine: 10:00 pm # Rhat Linux server using date command: Fri

RE: checkbox label font

2003-07-11 Thread Charles K. Clarkson
Sawsan Sarandah [EMAIL PROTECTED] wrote: : : Greetings, : : In a checkbox form, how can I change the font : attribute for the label text below to Arial : instead of the default? The font is deprecated. Use stylesheets (CSS) or use the 'style' attribute. :

Re: md5

2003-07-11 Thread Alexander Blüm
I solved the problem... not using OO-style, but function-style. like this: ... use Digest::MD5 qw(md5_hex); ... $r-print( pre$pw -gt; .md5_hex($pw)./pre ); ... *tadaa* Alexander Blüm wrote: hello I ran into an odd problem, that I cannot explain to myself... I use mod_perl 1.27 and apache

delete file

2003-07-11 Thread Boon Chong Ang
Hi, My name is Boon Chong. I have question. Just say, I run a perl script and in between of the process I create a temporarily file for checking purpose. Now, how do I ask perl to delete the file automatically? Thank you best regards, ABC

RE: delete file

2003-07-11 Thread NYIMI Jose (BMB)
perl -f unlink http://www.perldoc.com/perl5.8.0/pod/func/unlink.html José. -Original Message- From: Boon Chong Ang [mailto:[EMAIL PROTECTED] Sent: Friday, July 11, 2003 10:13 AM To: [EMAIL PROTECTED] Subject: delete file Hi, My name is Boon Chong. I have question. Just say,

Re: delete file

2003-07-11 Thread Sudarshan Raghavan
Boon Chong Ang wrote: Hi, My name is Boon Chong. I have question. Just say, I run a perl script and in between of the process I create a temporarily file for checking purpose. Now, how do I ask perl to delete the file automatically? Automatically as in, when the script finished executing? Use

Re: a program problem for print?

2003-07-11 Thread John W. Krahn
Julie Xu wrote: Greeting, Hello, I am trying to create a simple perl script to read a text file (8 columns separated by space) and output the colume6,8. The file format is: Entry11 entry12 entry13 entry14 entry15 entry16 entry17 entry18 Entry21 entry22 entry23 entry24 entry25 entry26

How to get a file

2003-07-11 Thread vemulakonda uday bhaskar
hi all my code : #!usr/local/bin use Net::SFTP; use Net::SSH::Perl; use strict; use warnings; my $SFTP=Net::SSH::Perl-new(xxx.xxx.xxx.xxx) or die Cant connect; $sftp-login(xyz,abc); the above code is working fine. Bu what is tehe command to get or put a file the command $sftp-get(filenamne)

Re: delete file

2003-07-11 Thread John W. Krahn
Boon Chong Ang wrote: Hi, Hello, My name is Boon Chong. I have question. Just say, I run a perl script and in between of the process I create a temporarily file for checking purpose. Now, how do I ask perl to delete the file automatically? Use IO::File::new_tmpfile() perldoc IO::File

Need Regex help !!

2003-07-11 Thread Pandey Rajeev-A19514
Hi, In short, I have a defined set of pattern that can occur across any number of lines(scalars) in a buffer (array of scalars) and I need to print only those lines(Scalars) that contain the full or partial pattern. For eg. For the buffer @buff (as shown below), I have to find out the

Re: Need Regex help !!

2003-07-11 Thread Rob Anderson
Hi Rajeev, I'm not sure why you feel the need to join your buffer into a big string. From what you describe couldn't you just process each buffer element one by one? foreach my $buffer_entry (@buff) { if($buffer_entry =~ /(FastEthernet|down)/i) { print $buffer_entry; } } Let us

RE: Need Regex help !!

2003-07-11 Thread Pandey Rajeev-A19514
Hi Rob, Yes, I need a tight pattern representation because the buffer I need to parse is slightly complicated than what I had pasted in the mail. /(FastEthernet|down)/i) gives me an option of FastEthernet OR down. I want something like FastEthernet AND down. How do we give AND operation ? I

[OT] Re: Why is $_ being change.

2003-07-11 Thread Elias Assmann
On Thu, Jul 10, 2003 at 08:39:05PM -0700, [EMAIL PROTECTED] wrote: Geez, is that your real name? Yes, it is. However, where I live, few people find it remarkable. If I ever felt bad about it, maybe laughing a bit about Johnny Depp's name would cheer me up (Depp means idiot in German).

Re: delete file

2003-07-11 Thread Asif Iqbal
try unlink . example: unlink $file; On Fri, 11 Jul 2003, Boon Chong Ang wrote: Hi, My name is Boon Chong. I have question. Just say, I run a perl script and in between of the process I create a temporarily file for checking purpose. Now, how do I ask perl to delete the file automatically?

Re: Creating a hash of arrays from row data

2003-07-11 Thread Sudarshan Raghavan
Robin Norwood wrote: To sort-of change the subject, I think the 'deep_copy' subroutine quoted in this article contains a bug... the sub in question: sub deep_copy { my $this = shift; if (not ref $this) { $this; } elsif (ref $this eq ARRAY) { [map deep_copy($_), @$this]; } elsif (ref

RE: How to end a while(1) loop

2003-07-11 Thread Bob Showalter
Michael Weber wrote: I am trying to write a simple filter that will mark in different colors certain words as they pass through. For example, if I do a tail -f /var/log/messages I want words I am looking for to be in red and other words in yellow with the rest of the text unchanged. (There

help needed plzz...

2003-07-11 Thread vemulakonda uday bhaskar
hi all i have got a code for transferring files from one linux system to another linux system through SFTP. i have installed in both systems Net::SFTP; my code is as follows: #!usr/bin/perl use Net::SFTP; use strict; use warnings; my

Perl and Exchange Server

2003-07-11 Thread Chris Rogers
I have been trying for some time to get at the contacts in a mailbox on exchange server 5.5. I have been using Win32::OLE with CDO. I can get the contacts folder, the count of items in it, and even the name of each contact but I can't seem to get at any of the fields. I have found many examples

RE: Perl and Exchange Server

2003-07-11 Thread Tim Johnson
Maybe it would help if you gave us what you've tried? -Original Message- From: Chris Rogers [mailto:[EMAIL PROTECTED] Sent: Friday, July 11, 2003 8:24 AM To: [EMAIL PROTECTED] Org (E-mail) Subject: Perl and Exchange Server I have been trying for some time to get at the contacts in a

Re: How to end a while(1) loop

2003-07-11 Thread Michael Weber
First, thanx to Tim and Bob. It is working as I would like. Now I have a substitution question. If $line is delay=12, status=sent (fw-3.alliednational.com) how do I make a substitution like this... #!/usr/bin/perl -w use strict; my $line; my $red=\033[0;31m; my $yellow=\033[0;33m; my

Re: Substituting a space with a comma

2003-07-11 Thread deb
Thanks! I get it now! deb At 21:37:06, on 07.10.03: Cracks in my tinfoil beanie allowed Rob Dixon to seep these bits into my brain:, Deb wrote: Rob, you were very helpful in showing me how the split and join work, but since I wasn't looking to change anything in $line except to replace

Re: Need Regex help !!

2003-07-11 Thread Rob Dixon
Pandey Rajeev-A19514 wrote: Rob ANderson wrote: Pandey Rajeev-A19514 wrote: In short, I have a defined set of pattern that can occur across any number of lines(scalars) in a buffer (array of scalars) and I need to print only those lines(Scalars) that contain the full or partial

Re: How to end a while(1) loop

2003-07-11 Thread Tim Yohn
Michael, On Fri, 2003-07-11 at 11:56, Michael Weber wrote: $line =~ s/reject/$red.reject.$normal/gi ; $line =~ s/ from /$yellow from $normal/gi ; $line =~ s/status/$blue status $normal/gi ; The following does work however I don't know exactly how valid it is (which is

Re: Perl and Exchange Server

2003-07-11 Thread Barry C . Hawkins
On Friday, Jul 11, 2003, at 11:24 US/Eastern, Chris Rogers wrote: I have been trying for some time to get at the contacts in a mailbox on exchange server 5.5. I have been using Win32::OLE with CDO. I can get the contacts folder, the count of items in it, and even the name of each contact but

Re: Regex parsing question

2003-07-11 Thread Rob Dixon
Perl wrote: I am attempting to parse a log file that looks something like: 759033281 TE18 Vups_MsgStore constructor - add to MDBTable EX:/O=MSGENG/OU=EUROPE/CN=RECIPIENTS/CN=PHARWOOD 759033281 TE18 Vups_MsgStore AddRef=2 EX:/O=MSGENG/OU=EUROPE/CN=RECIPIENTS/CN=PHARWOOD 759033281 TE18 MSM

Re: joining keys

2003-07-11 Thread Kevin Pfeiffer
In article [EMAIL PROTECTED], John W. Krahn wrote: Sharad Gupta wrote: Hi Friends, Hello, Hi, I have a hash whose values can be either array, hash etc. say i have: my $self = { 'hello how' = { 'r u' = 'I am', }, 'fine thank'

Re: Regex parsing question

2003-07-11 Thread Rob Dixon
Perl wrote: I am attempting to parse a log file that looks something like: 759033281 TE18 Vups_MsgStore constructor - add to MDBTable EX:/O=MSGENG/OU=EUROPE/CN=RECIPIENTS/CN=PHARWOOD 759033281 TE18 Vups_MsgStore AddRef=2 EX:/O=MSGENG/OU=EUROPE/CN=RECIPIENTS/CN=PHARWOOD 759033281 TE18 MSM

Re: Regex parsing question

2003-07-11 Thread Rob Dixon
Rob Dixon wrote: Perl wrote: I am attempting to parse a log file that looks something like: 759033281 TE18 Vups_MsgStore constructor - add to MDBTable EX:/O=MSGENG/OU=EUROPE/CN=RECIPIENTS/CN=PHARWOOD 759033281 TE18 Vups_MsgStore AddRef=2

Re: joining keys

2003-07-11 Thread Rob Dixon
Well done Kevin! Just a couple of points. Kevin Pfeiffer wrote: In article [EMAIL PROTECTED], John W. Krahn wrote: Sharad Gupta wrote: Hi Friends, Hello, Hi, I have a hash whose values can be either array, hash etc. say i have: my $self = { 'hello how' = {

RE: Perl and Exchange Server

2003-07-11 Thread Chris Rogers
Here is the last feeble attempt: #!\perl\bin\perl.exe -w use strict; use Win32::OLE; use Win32::OLE::Const; my $DEBUG_FLAG = 1; # set it to zero for real job #names have been changed to protect the innocent my $server = servername; my $fname = Firstname; my $lname = Lastname; my $alias =

RE: Perl and Exchange Server

2003-07-11 Thread Chris Rogers
Thanks for the answer but I am actually looking for the Contacts folder in a mailbox. The GAL is available easily using LDAP, CDO, or the admin.exe from the command line. -Original Message- From: Barry C. Hawkins [mailto:[EMAIL PROTECTED] Sent: Friday, July 11, 2003 12:27 PM To: Chris

regexpr

2003-07-11 Thread Martin Costello
Hello, I'm trying to do a search and replace on a file (specifically the word transformC). A cut down version of the file is below: blahblah -blah blah -blah blah -blah $blah -blah Ground -c blah transformC transformC;

RE: joining keys

2003-07-11 Thread Gupta, Sharad
Aha! Thanx to all for help. I did'nt realized i can do it like this yesterday. So i created a small routine and passed the keys through it at the time of creation itself. I'll try it. Thanx, -Sharad -Original Message- From: Rob Dixon [mailto:[EMAIL PROTECTED] Sent: Friday, July 11,

RE: Regex parsing question

2003-07-11 Thread Pandey Rajeev-A19514
Hi Rob, Thanks ! That was helpful. Do we have a lex and Yacc equivalent in Perl ? I am writing an automation tool based on Client and server for Cisco devices. I am doing the testcase parsing in Lex and Yacc (flex and bison) to create the parser tree and then I user the server written in Perl

Re: regexpr

2003-07-11 Thread John W. Krahn
Martin Costello wrote: Hello, Hello, I'm trying to do a search and replace on a file (specifically the word transformC). A cut down version of the file is below: blahblah -blah blah -blah blah -blah $blah -blah Ground -c blah transformC transformC; blahblah -af

-M filetest operator

2003-07-11 Thread magelord
hi, why cant i check the age of a file when the path contains a point? --- use File::Basename; #$path=/home/raid/golchert/.cxoffice/dotwine/filelist.dat; $path=/tmp/someFile; print \n alter von $path = .(-M $path). \n if (-M $path =4 !(dirname($path)=~/\./) !(-d $path)); --- maybe you have to

Re: -M filetest operator

2003-07-11 Thread Steve Grazzini
On Fri, Jul 11, 2003 at 09:29:28PM +0200, [EMAIL PROTECTED] wrote: why cant i check the age of a file when the path contains a point? You can. :-) use File::Basename; #$path=/home/raid/golchert/.cxoffice/dotwine/filelist.dat; $path=/tmp/someFile; print \n alter von $path = .(-M $path). \n

Re: How to end a while(1) loop

2003-07-11 Thread John W. Krahn
Tim Yohn wrote: Michael, On Fri, 2003-07-11 at 11:56, Michael Weber wrote: $line =~ s/reject/$red.reject.$normal/gi ; $line =~ s/ from /$yellow from $normal/gi ; $line =~ s/status/$blue status $normal/gi ; The following does work however I don't know exactly

[OT] - News Sever/reader

2003-07-11 Thread Paul Kraus
I am getting tired of having 8 mailing lists that are all coming to me via pop/smtp. Our service provider offers to send news (Seed) to a news server if we set one up. Should I do this or are there any good free news servers out there that have access to this list? Is outlook a decent windows news

Re: joining keys

2003-07-11 Thread Kevin Pfeiffer
In article [EMAIL PROTECTED], Rob Dixon wrote: Well done Kevin! Just a couple of points. Am I surprised? ;-) sub pad_keys { my $ref = shift; if (ref $ref eq HASH) { for my $value (%$ref) { This will loop over all the keys and values in the hash, in the order key1,

RE: [OT] - News Sever/reader

2003-07-11 Thread wiggins
On Fri, 11 Jul 2003 15:56:31 -0400, Paul Kraus [EMAIL PROTECTED] wrote: I am getting tired of having 8 mailing lists that are all coming to me via pop/smtp. Our service provider offers to send news (Seed) to a news server if we set one up.

Re: How to invoke the Linux KDE browser?

2003-07-11 Thread wiggins
On Fri, 11 Jul 2003 12:13:19 -0700, Frank B. Ehrenfried [EMAIL PROTECTED] wrote: I am going through a chapter in a perl text on cgi - trying to master it. Appartently, I need to transfer a cgi script to the ISP's server, then invoke it with

Re: [OT] - News Sever/reader

2003-07-11 Thread Steve Grazzini
On Fri, Jul 11, 2003 at 03:32:10PM -0500, [EMAIL PROTECTED] wrote: On Fri, 11 Jul 2003 15:56:31 -0400, Paul Kraus [EMAIL PROTECTED] wrote: are there any good free news servers out there that have access to this list? Sorry I can't help on the news front, I don't have access either so if

Re: Need Regex help !!

2003-07-11 Thread Kevin Pfeiffer
In article [EMAIL PROTECTED], Rob Dixon wrote: Pandey Rajeev-A19514 wrote: Rob ANderson wrote: Pandey Rajeev-A19514 wrote: In short, I have a defined set of pattern that can occur across any number of lines(scalars) in a buffer (array of scalars) and I need to print only those

A thank you gift

2003-07-11 Thread Michael Weber
I have asked many questions of this group and gotten many good answers. No matter how dumb the question, I have always gotten a kind response. Thank you. The fruit of my recent efforts is a program that colorizes text for easier viewing. I needed something that would highlight errors in log

RE: A thank you gift

2003-07-11 Thread wiggins
On Fri, 11 Jul 2003 15:50:31 -0500, Michael Weber [EMAIL PROTECTED] wrote: I have asked many questions of this group and gotten many good answers. No matter how dumb the question, I have always gotten a kind response. Thank you. The fruit

Re: joining keys

2003-07-11 Thread John W. Krahn
Rob Dixon wrote: Well done Kevin! Just a couple of points. Kevin Pfeiffer wrote: (I noticed that, too.) But thanks to your tip I think I've created my first recursive sub-routine (only tested on this example). If it does what the OP requested (and y'all don't find too much wrong

Re: joining keys

2003-07-11 Thread Kevin Pfeiffer
In article [EMAIL PROTECTED], John W. Krahn wrote: [...] Kevin and Rob, perldoc -q add or remove keys from a hash Found in /usr/lib/perl5/5.6.0/pod/perlfaq4.pod What happens if I add or remove keys from a hash while iterating over it? Don't do that. :-) [..]

Re: joining keys

2003-07-11 Thread Steve Grazzini
On Fri, Jul 11, 2003 at 02:17:52PM -0700, John W. Krahn wrote: Rob Dixon wrote: sub pad_keys { foreach (keys %$ref) { pad_keys($ref-{$_}); next unless (my $new = $_) =~ tr/ /_/; if (exists $ref-{$new}) { warn Padded key $new already exists; }

Re: Hiding Params in url

2003-07-11 Thread Dennis Stout
POST versus GET. POST won't pass the value in the url. This doesn't prevent someone from doing a view source and reading the input type=hidden text, but A crypt() on the parameters would be a good idea, then pass the encrypted string around. S.T.O.U.T. = Synthetic Technician Optimized for

Re: regexpr

2003-07-11 Thread Martin Costello
John, Thank you ever so much - that seemed to work. In my code I'm actually using variables for the names to replace: so my substitute looks like this : $line =~ s/([^]+|\w+)/ $1 eq $oldList[$i] ? $newList[$i] : $1 eq $oldList[$i] ? $newList[$i] : $1 /eg; (I removed the q( ) parts from your

Re: regexpr

2003-07-11 Thread John W. Krahn
Martin Costello wrote: John W. Krahn wrote: Here is one way to do it: $ perl -e' $text = q/ blahblah -blah blah -blah blah -blah $blah -blah Ground -c blah transformC transformC; blahblah -af transformCblah($blah) -af AtransformC blah ($blah)

Re: joining keys

2003-07-11 Thread Rob Dixon
John W. Krahn wrote: Rob Dixon wrote: Well done Kevin! Just a couple of points. Kevin Pfeiffer wrote: (I noticed that, too.) But thanks to your tip I think I've created my first recursive sub-routine (only tested on this example). If it does what the OP requested (and

Re: joining keys

2003-07-11 Thread Rob Dixon
Rob Dixon wrote: John W. Krahn wrote: Rob Dixon wrote: Well done Kevin! Just a couple of points. Kevin Pfeiffer wrote: (I noticed that, too.) But thanks to your tip I think I've created my first recursive sub-routine (only tested on this example). If it does

Re: joining keys

2003-07-11 Thread Rob Dixon
Kevin Pfeiffer wrote: In article [EMAIL PROTECTED], Rob Dixon wrote: Well done Kevin! Just a couple of points. Am I surprised? ;-) sub pad_keys { my $ref = shift; if (ref $ref eq HASH) { for my $value (%$ref) { This will loop over all the keys and values in

alarm(x) question.

2003-07-11 Thread denis
I'm kind of new to Perl, so please forgive the question.. I'm trying to use perl to read a file and then run a program using the file. I also want to use the alarm(x) function to skip to the next entry in the files if it times out. Here's what Ive go so far: open (TESTFILE, regression) || die

Re: How to invoke the Linux KDE browser?

2003-07-11 Thread Frank B. Ehrenfried
I am going through a chapter in a perl text on cgi - trying to master it. Appartently, I need to transfer a cgi script to the ISP's server, then invoke it with the browser. Since my ISP does not allow cgi scripts to be run on their server, I have wriiten a perl script (see below) that

Re: regexpr

2003-07-11 Thread Martin Costello
Thanks again - that /eg opens up a whole world of possibilities! John W. Krahn wrote: q() is another way of saying ''. All the quote operators can be found in the perlop.pod document under Quote and Quote-like Operators section. If you want your version to work correctly you are going to have

Re: match count

2003-07-11 Thread Jeff 'japhy' Pinyan
On Jul 7, David Storrs said: What the \K does is make the regex think it JUST started matching, so instead of replacing a bunch of stuff plus some extra fluff with the original bunch of stuff, we just say after you've matched X, pretend you started matching HERE. It comes in handy in