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
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
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
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
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,
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
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
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
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.
:
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
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
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,
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
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
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)
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
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
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
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
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).
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?
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
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
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
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
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
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
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
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
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
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
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
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'
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
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
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' = {
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 =
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
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;
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,
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
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
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
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
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
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
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,
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.
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
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
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
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
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
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
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. :-)
[..]
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;
}
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
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
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)
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
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
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
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
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
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
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
66 matches
Mail list logo