RE: get all the arrays with names starting with xyz

2003-08-17 Thread Marcos . Rebelo
the eseast way is having all the arrays in a hash. map{$hash{$_}->[$index]="" if /^xyz/}(keys(%hash)); -Original Message- From: T.S.Ravi Shankar [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2003 8:51 AM To: [EMAIL PROTECTED] Cc: Ravi Subject: get all the arrays with names starti

get all the arrays with names starting with xyz

2003-08-17 Thread T.S.Ravi Shankar
Hi all : I have few arrays with names starting with "xyz_". After the initial definitions I want to change values of a particular index of all arrays whose names start with "xyz_". It would be cumbersome for me to do something like : $xyz_blahblah[$index] = "ldfhdlf"; $xyz_blooblooh[$index] = "

Cron problems

2003-08-17 Thread Vema Venkata
Hi Floks when i am trying to run the following script it is getting executed but when iam tryint to execute thru corntab it is not?can any one suggest the script name is xapipgm.pl *** #!/bin/sh #myrun.shell xapipgm

RE: Cron jobs and perl

2003-08-17 Thread Vema Venkata
have u got the soultion for this? because iam following the same problem can you help me out -Original Message- From: Trina Espinoza [mailto:[EMAIL PROTECTED] Sent: Saturday, 16 August 2003 9:46 PM To: [EMAIL PROTECTED] Subject: Cron jobs and perl Can someone tell me how to go about run

how to read?

2003-08-17 Thread Jerry Preston
Hi! This one is new to me and I need to be able to read $name and $age from the following: @history = ( { program => 'new', version => '0.42', }, input => { '/data' => 0.14, '/home' => undef, }, input_contents => ' $name = \'Jerry\'; $age=

Re: visual perl

2003-08-17 Thread DrJ
Thanks for that Joseph. You have included heaps of detail. I shall give this a go. Thanks again. Janice. On Fri, 2003-08-15 at 11:59, R. Joseph Newton wrote: > Dr J wrote: > > > > > MS Visual studio .NET > > > > > Technology. Does this need to be installed? If so, is there an > > > > evaluation v

Re: NET::FTP

2003-08-17 Thread John W . Krahn
On Sunday 17 August 2003 08:51, Cook, Harold D GARRISON wrote: > > I'm having a problem with NET::FTP. Please see code below. My > problem seems to be with the login method call, the error I get is: > Can't call method "login" on an undefined value at putcffile.pl line > 56. > > I know this is not

Re: Cutting Variable

2003-08-17 Thread SilverFox
Jeff 'Japhy' Pinyan wrote: > On Aug 17, SilverFox said: > >>Hi all...how can I pull the number from the given path?? >> >>/Machine4/dir/dir/dir > > Well, it's a little vague, but perhaps all you want is > > my ($num) = $path =~ /(\d+)/; > > Or perhaps > > my ($num) = $path =~ /Machine(\d+

Re: Removing after a string

2003-08-17 Thread John W . Krahn
On Sunday 17 August 2003 08:20, Pablo Fischer wrote: > > Hi! Hello, > I know that I can do this with split, but I cant (but I did it days > ago, now I cant remember :( ). $string = ( split /=/, 'server=192.168.1.1', 2 )[ 1 ]; > I have > > $string, like "server=192.168.1.1" > > The big question

Re: Removing after a string

2003-08-17 Thread Jeff 'japhy' Pinyan
On Aug 17, Pablo Fischer said: >I know that I can do this with split, but I cant (but I did it days ago, >now I cant remember :( ). > >I have > >$string, like "server=192.168.1.1" > >The big question, how can I just keep the data after =, so I will have: > >$string="192.168.1.1" instead of $string

Re: using a hash for lots of replacements

2003-08-17 Thread Jeff 'japhy' Pinyan
On Aug 17, David T-G said: >Hmmm... Well, it wasn't happy. I got the assignment right, it seems, >but then I can't use it: > > 43 while ( my @row = $result->fetchrow_array ) > 44 { [snip] > 52 my (%template,%userdata) ;# we must predefine > if we're to

Re: using a hash for lots of replacements

2003-08-17 Thread David T-G
Jeff, et al -- ...and then Jeff 'japhy' Pinyan said... % % On Aug 17, David T-G said: % % >% Yes. I'm using s{}{} instead of s///. I prefer the use of {} delimiters % >% when I'm doing a s///e, because it better represents the "code" aspect of % >% the replacement. % > % >Ohhh... Slick.

Removing after a string

2003-08-17 Thread Pablo Fischer
Hi! I know that I can do this with split, but I cant (but I did it days ago, now I cant remember :( ). I have $string, like "server=192.168.1.1" The big question, how can I just keep the data after =, so I will have: $string="192.168.1.1" instead of $string="server=192.168.1.1"; thanks! --

Re: Cutting Variable

2003-08-17 Thread Jeff 'japhy' Pinyan
On Aug 17, SilverFox said: >Hi all...how can I pull the number from the given path?? > >/Machine4/dir/dir/dir Well, it's a little vague, but perhaps all you want is my ($num) = $path =~ /(\d+)/; Or perhaps my ($num) = $path =~ /Machine(\d+)/; -- Jeff "japhy" Pinyan [EMAIL PROTECTED]

Re: Localtime minutes before or after

2003-08-17 Thread Jeff 'japhy' Pinyan
On Aug 17, Pablo Fischer said: >030817145 Does that represent... 03 -> 2003 08 -> August 17 -> 17th 14 -> 2pm 5 -> 5 minutes I'm a little wary of that form of storing the date, but I suppose we can deal with it. >However in some parts of my code I need to get another date, and I onl

Re: using a hash for lots of replacements

2003-08-17 Thread Jeff 'japhy' Pinyan
On Aug 17, David T-G said: >% Yes. I'm using s{}{} instead of s///. I prefer the use of {} delimiters >% when I'm doing a s///e, because it better represents the "code" aspect of >% the replacement. > >Ohhh... Slick. Can I use () or perhaps even [] as well? Indeed, and <> too. Those are

Re: using a hash for lots of replacements

2003-08-17 Thread David T-G
Jeff, et al -- ...and then Jeff 'japhy' Pinyan said... % % On Aug 17, David T-G said: % % >% That's good of you to show how you'd do it in another language (yes, even % >% if that language is PHP ;) ), because it clears up what you want to do. % > % >Indeed. It was the most succinct way to expl

Re: passing hashes to subs

2003-08-17 Thread David T-G
Jeff, et al -- ...and then Jeff 'japhy' Pinyan said... % % On Aug 17, David T-G said: % % >% > 45 my $body = % >% > 46 &parseit ... % >% % >% First, you can drop the & on the function call. It's not necessary. % > % >Interesting. I thought it was a good thing for clarification.

Re: using a hash for lots of replacements

2003-08-17 Thread Jeff 'japhy' Pinyan
On Aug 17, David T-G said: >% That's good of you to show how you'd do it in another language (yes, even >% if that language is PHP ;) ), because it clears up what you want to do. > >Indeed. It was the most succinct way to explain it :-) This list (and many others) often receives questions about

Re: Localtime minutes before or after

2003-08-17 Thread Bernhard van Staveren
Localtime takes it's input either from the time() function if you call it without parameters, or from a timestamp you supply. So, if I wanted the current date and time, but 10 minutes into the future I'd do: my $mydate=localtime( time() + 600 ); (600 seconds being 10 minutes, added to the curre

Re: passing hashes to subs

2003-08-17 Thread Jeff 'japhy' Pinyan
On Aug 17, David T-G said: >% > 45 my $body = >% > 46 &parseit >% > 47 ( >% > 48 {ASCII=>$ascii,HTML=>$html}, >% > 49 {flag=>$flag,EMAIL=>$email,NAME_FIRST=>$fn,NAME_LAST=>$ln} >% > 50 ) ; >% >% First, you can drop the & on the function call. It's

Localtime minutes before or after

2003-08-17 Thread Pablo Fischer
Hi! Im looking for a module (or way) to add N minutes to localtime, for example, I have: 030817145 That localtime returns me: Sun Aug 17 14:05:21 2003 However in some parts of my code I need to get another date, and I only have: 030817145 and that I need the time in 10 minutes before/after, ho

Re: :Telnet

2003-08-17 Thread SilverFox
David Storrs wrote: > On Mon, Aug 11, 2003 at 09:42:40AM -0400, Stephen Gilbert wrote: >> > -Original Message- >> > From: SilverFox [mailto:[EMAIL PROTECTED] >> > Sent: Sunday, August 10, 2003 4:58 PM >> > To: [EMAIL PROTECTED] >> > Subject: Net::Telnet >> > >> > >> > hey anyone know how

Cutting Variable

2003-08-17 Thread SilverFox
Hi all...how can I pull the number from the given path?? /Machine4/dir/dir/dir -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: using a hash for lots of replacements

2003-08-17 Thread David T-G
Jeff, et al -- ...and then Jeff 'japhy' Pinyan said... % % On Aug 17, David T-G said: % % > my $string = "Hello, #NAME_FIRST# #NAME_LAST# from #STATE#!" ; ... % > my %xlate = ... % >instance, in php, I would write something like % > % > $fields = array('#NAME_FIRST#','#NAME_LAST#','#STATE#')

Re: passing hashes to subs

2003-08-17 Thread David T-G
James, et al -- ...and then James Edward Gray II said... % % On Sunday, August 17, 2003, at 06:15 AM, David T-G wrote: % ... % > 46 &parseit % > 47 ( % > 48 {ASCII=>$ascii,HTML=>$html}, % > 49 % >{flag=>$flag,EMAIL=>$email,NAME_FIRST=>$fn,NAME_LAST=>$ln} % >

Re: passing hashes to subs

2003-08-17 Thread David T-G
Jeff, et al -- ...and then Jeff 'japhy' Pinyan said... % % On Aug 17, David T-G said: % % >I've gotten rusty and so I'm back again as a rank amateur :-) % % That's not very professional of you. ;) No, it isn't :-) There isn't much call for perl when hanging sheet rock or cleaning basements, t

Re: Please don't say RTFM

2003-08-17 Thread David Wall
--On Sunday, August 17, 2003 5:08 PM +0100 Rob Dixon <[EMAIL PROTECTED]> wrote: Glad you're on track, but I'd prefer no 'F's. RTM is fine :) What does Robert T. Morris have to do with it? :-) One thing that makes life easier for us people on windoze to use perldoc is to grab a copy of less t

AW: SSH Problem

2003-08-17 Thread Björn Brombach
I wanted to add some more details: When i use this skript: my $supported = Net::SSH::Perl::Cipher::supported(); for my $cipher (sort @$supported) { printf "[%d] %s\n", $ciph, Net::SSH::Perl::Cipher::name($cipher); } I get only [5] RC4 as a result. So maybe thats why i always get that not

NET::FTP

2003-08-17 Thread Cook, Harold D GARRISON
I'm having a problem with NET::FTP. Please see code below. My problem seems to be with the login method call, the error I get is: Can't call method "login" on an undefined value at putcffile.pl line 56. I know this is not a FW issue because I'm testing by ftp'ing to myself and I can login in with

working with forms - send this page

2003-08-17 Thread Rich Points
Beginners, I've been on this list for about a week now and its been very helpful, thanks to all who participate. I'm still very much a beginner with no programming experience whatsoever and I've been reading a lot of the beginning books lately. I'm finding that not only can Perl do things more th

SSH Problem

2003-08-17 Thread Björn Brombach
Hi, I have installed SuSE 8.2, perl-Net-SSH-Perl-1.23, String-CRC32-1.2. I am trying to make an SSH connection to a remote SuSe 8.2 computer. And the perl skript is where i am having the problem. Trying to use it produces the following error: "selected cipher type DES not supported by server." I t

Re: Please don't say RTFM

2003-08-17 Thread Rob Dixon
Robert Mark White wrote: > Thank for all your explanations, yours were better than the books. > Your right about perldoc perl, I found it a couple of hours after I wrote > the orginal messge > I had been reading for 4 hours when i wrote the orginal message. > now after another 8 hours of RTFM even

Re: Is it a good idea-verifing incoming info

2003-08-17 Thread awards
Hi, thank you We ll you ask > Finally, why are you using a hash? Why not just store the values back > into param()? If you're dealing with a form that has checkboxes, or > multiple fields with the same name, you'll lose some data your way. I'm using a hash because the actual code is %ACTI

Re: Please don't say RTFM

2003-08-17 Thread Robert Mark White
Thank for all your explanations, yours were better than the books. Your right about perldoc perl, I found it a couple of hours after I wrote the orginal messge I had been reading for 4 hours when i wrote the orginal message. now after another 8 hours of RTFM even I can find many of my own mistakes.

Re: Is there an ODBC module in perl ?

2003-08-17 Thread Rob Dixon
<[EMAIL PROTECTED]> wrote: > Is there an ODBC module in perl ? Yes, but are you sure you need ODBC? Perl has a number of database driver modules which will be better tailored to a given database. Unless your only access is ODBC? Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addition

Re: Please don't say RTFM

2003-08-17 Thread Rob Dixon
Robert wrote: > > Please don't say RTFM I don't think we've ever said that. But we often say Please RTM /here/ > Please be gentle with me .. We will. There are a few things that don't go down too well: usually doing other people's work for them. But if you've tried and got stuck then you're a

Re: i need help accessing a hash

2003-08-17 Thread Rob Dixon
<[EMAIL PROTECTED]> wrote: > Rob Dixon wrote: > > > > There's no need for '->' between successive parentheses. Or > > for quotes around all 'word' ( !~ /\W/ ) hash keys. > > > > $hotspots->{JERRY}{cell_center}[0] == -1240955; > > > > I'm an explicit kind of guy. ;-) I agree: anything for the sa

Re: passing hashes to subs

2003-08-17 Thread James Edward Gray II
On Sunday, August 17, 2003, at 06:15 AM, David T-G wrote: Hi, all -- Howdy. I've gotten rusty and so I'm back again as a rank amateur :-) I have a script that will make a database connection, pull out some rows, repeatedly generate personalized message bodies, and send those bodies. I'm stuck

Re: using a hash for lots of replacements

2003-08-17 Thread Jeff 'japhy' Pinyan
On Aug 17, David T-G said: > my $string = "Hello, #NAME_FIRST# #NAME_LAST# from #STATE#!" ; > >and I want to replace those chunks each with another string, what is a >good way to approach that? I'd love to use something like > > my %xlate = > ( >NAME_FIRST => "David", >NAME_LAST => "T-

Re: passing hashes to subs

2003-08-17 Thread Jeff 'japhy' Pinyan
On Aug 17, David T-G said: >I've gotten rusty and so I'm back again as a rank amateur :-) That's not very professional of you. ;) > 45 my $body = > 46 &parseit > 47 ( > 48 {ASCII=>$ascii,HTML=>$html}, > 49 {flag=>$flag,EMAIL=>$email,NAME_FIRST=>$fn,NAME_

Re: Is it a good idea-verifing incoming info

2003-08-17 Thread Jeff 'japhy' Pinyan
On Aug 17, awards said: >I have many forms, and basically I just need to receive either a number >or characters or both. this is how I check To answer your subject line, YES, it is a good idea to verifying the data a user sends you is what you expect. >my ($value,%result,$name); $value and $nam

using a hash for lots of replacements

2003-08-17 Thread David T-G
Hi, all -- If I have a string like my $string = "Hello, #NAME_FIRST# #NAME_LAST# from #STATE#!" ; and I want to replace those chunks each with another string, what is a good way to approach that? I'd love to use something like my %xlate = ( NAME_FIRST => "David", NAME_LAST => "T-

Re: Please don't say RTFM

2003-08-17 Thread David T-G
Robert -- ...and then Robert Mark White said... % % Dear Gentle Readers, % % Please be gentle with me as this is only my first day trying to learn perl. Hey, we've all been there :-) I can't recommend highly enough the "Learning Perl" and "Programming Perl" books. I read "Learning" to get sta

Re: Cron jobs and perl

2003-08-17 Thread David T-G
Trina -- ...and then Trina Espinoza said... % % Can someone tell me how to go about running a cron job with perl? Probably so. Finding that someone could be tricky, though :-) % % Here's what I have thus far: % % 1) I have a cron job: % % 04 09 * * 1-7 /cygdrive/c/Documents\ and\ Settings

passing hashes to subs

2003-08-17 Thread David T-G
Hi, all -- I've gotten rusty and so I'm back again as a rank amateur :-) I have a script that will make a database connection, pull out some rows, repeatedly generate personalized message bodies, and send those bodies. I'm stuck at the generation part. I want to pass a couple of hashes to my fu

Is it a good idea-verifing incoming info

2003-08-17 Thread awards
Hi, I have many forms, and basically I just need to receive either a number or characters or both. this is how I check my ($value,%result,$name); foreach (param){ $name = $_; $name =~ s/\s$//;##take the space at the end $name =~ s/[^a-zA-Z0-9]//g;##all none character is change into n