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
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] = "
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
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
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=
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
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
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+
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
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
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
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.
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!
--
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]
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
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
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
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.
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
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
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
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
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
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]
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#')
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}
% >
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
--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
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
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
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
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
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
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
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.
<[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
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
<[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
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
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-
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_
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
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-
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
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
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
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
47 matches
Mail list logo