Gunnar Hjalmarsson wrote:
Chas. Owens wrote:
On Sat, Mar 22, 2008 at 11:53 PM, Richard Lee <[EMAIL PROTECTED]>
wrote:
snip
@{ $HoH{$1} }{ @{ $HoA{$1} } } = split;
This is really spinning my heads in all direction trying to see if I
can
truly understand them instead of just using it.
snip
Richard Lee wrote:
say I have @data which below was pushed(bunch of them) with below hash
of hash refernce
$VAR1 = {
'element' => {
'element2' => 'now',
'element3' => '2',
'element4' => '
Hi all,
How we can check the argument is passing to the running file or not?
#sample.pl 2008 03
i want to check the two arguments of 2008 & 03 is passed to sample.pl or
not..
Thanks,
No it is not a homework. It's a official script which I want to make it
into production???
Please help.
Regards,
Irfan
-Original Message-
From: Ken Foskey [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2008 1:48 PM
To: beginners@perl.org
Subject: RE: diff of two files
Sounds like
Hi ,
Looking at the reg expression ( $playercard1 =~ /10|J|Q|K/ ),
it will match 0, 1, and '10' , J, Q, K
What must I do so that it will match only '10' , 'J', 'Q', and 'K'
Thanks
- Original Message -
From: "Rodrick Brown" <[EMAIL PROTECTED]>
#!/usr/bin/perl -w
use strict;
use war
Arguments are passed in the @ARGV array.
You can access $ARGV[0] and $ARGV[1]
unless (defined $ARV[0] and defined $ARGV[1]) {
die "You need to supply two arguments\n";
}
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On Mon, Mar 24, 2008 at 9:00 AM, <[EMAIL PROTECTED]> wrote:
> Hi ,
> Looking at the reg expression ( $playercard1 =~ /10|J|Q|K/ ),
> it will match 0, 1, and '10' , J, Q, K
>
> What must I do so that it will match only '10' , 'J', 'Q', and 'K'
>
> Thanks
/10|J|Q|K/ will not match 0 or 1 alone.
On Mon, 2008-03-24 at 17:46 +0530, sivasakthi wrote:
> Hi all,
>
> How we can check the argument is passing to the running file or not?
>
> #sample.pl 2008 03
>
> i want to check the two arguments of 2008 & 03 is passed to sample.pl or
> not..
if( defined $ARGV[1] ) {
die "Two arguments re
sivasakthi wrote:
Hi all,
Hello,
How we can check the argument is passing to the running file or not?
#sample.pl 2008 03
i want to check the two arguments of 2008 & 03 is passed to sample.pl or
not..
@ARGV == 2 or die "You must supply two arguments!\n";
John
--
Perl isn't a toolbox, bu
Hi,
I am trying to use permute call from the above module and I get the
following error.
I believe this is due to either missing lib or incorrect path setting.
Can you tell
me how to install this package quickly in my home path and try out this call?
Regards
Can't locate Algorithm/Permute.pm in
Hi all,
I'm trying to write a simple do until loop to print out the value of $strA0
through $striA3. What i'm doing is replacing the value of 0 through 3 in the
$strA by joining two strings (my $strB = "strA" . $count;). Right now my script
is printing $strB as below. How do i get perl to prin
Bobby <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm trying to write a simple do until loop to print out the value of $strA0
> through $striA3. What i'm doing is replacing the value of 0 through 3 in the
> $strA by joining two strings (my $strB = "strA" . $count;). Right now my
> script i
Wolf,
I still don't understand, so set my $strB = "$strA($count)"; ? That didn't
worked.
Wolf <[EMAIL PROTECTED]> wrote:
Bobby wrote:
> Hi all,
>
> I'm trying to write a simple do until loop to print out the value of $strA0
> through $striA3. What i'm doing is replacing the value of 0
Bobby <[EMAIL PROTECTED]> wrote:
> Wolf,
>
> I still don't understand, so set my $strB = "$strA($count)"; ? That didn't
> worked.
>
> Wolf <[EMAIL PROTECTED]> wrote:
> Bobby wrote:
> > Hi all,
> >
> > I'm trying to write a simple do until loop to print out the value of $strA0
>
IIRC, Perl does not let you use a string to build a variable name like PHP does.
If you do this:
$myVar = 123;
$varName = "myVar";
print "$varName";
You get "myVar" and not "123" which seems to be what you want.
However, I think you might be able to use hashes and get what you want.
$hash{"
Thanks for both of your suggestions. I've tried them both but still getting
same result. Any other suggestions?
Thanks.
Wolf <[EMAIL PROTECTED]> wrote:
Bobby wrote:
> Wolf,
>
> I still don't understand, so set my $strB = "$strA($count)"; ? That didn't
> worked.
>
> Wolf wrote:
Grab a perl book or search the web for concatenating variables together...
Unfortunately the current place I am in doesn't have perl on the server for me
to try and play around more, but the gist is the same. Your problem arise from
setting it up as string during the concatination process.
Set
> Bobby wrote:
> Hi all,
>
> I'm trying to write a simple do until loop to print out the value of
> $strA0 through $striA3. What i'm doing is replacing the value of 0
> through 3 in the $strA by joining two strings (my $strB = "strA" .
> $count;). Right now my script is printing $strB as b
On Mar 24, 11:52 am, [EMAIL PROTECTED] (Sharan Basappa) wrote:
> Hi,
>
> I am trying to use permute call from the above module and I get the
> following error.
> I believe this is due to either missing lib or incorrect path setting.
> Can you tell
> me how to install this package quickly in my home
Bobby wrote:
I'm trying to write a simple do until loop to print out the value of
$strA0 through $striA3. What i'm doing is replacing the value of 0
through 3 in the $strA by joining two strings (my $strB = "strA" .
$count;). Right now my script is printing $strB as below. How do i
get perl t
On Mar 24, 12:09 pm, [EMAIL PROTECTED] (Bobby) wrote:
> Hi all,
>
> I'm trying to write a simple do until loop to print out the value of $strA0
> through $striA3. What i'm doing is replacing the value of 0 through 3 in the
> $strA by joining two strings (my $strB = "strA" . $count;). Right now m
I have a polling process that runs 24x7 ( internal site ) and for the
most part has no problems except that they shutdown the the internal
site every three or four weeks and my process then dies.
I have a simple setup:
$MyFtp = Net::FTP->new($GlblInfo{ipaddr}, Debug => 1);
$MyFtp
yitzle wrote:
IIRC, Perl does not let you use a string to build a variable name like PHP does.
Then you do not remember it correctly.
If you do this:
$myVar = 123;
$varName = "myVar";
print "$varName";
You get "myVar" and not "123"
Sure, but if you replace the last line with
prin
1) Can you set a really long timeout?
2) When I asked about doing something similar with Mechanize->get(),
someone suggested wrapping the call in an eval block and testing the
exit status of the function call. Or something like that. Would that
approach work here?
--
To unsubscribe, e-mail: [EMAI
On Mon, Mar 24, 2008 at 8:33 AM, <[EMAIL PROTECTED]> wrote:
> No it is not a homework. It's a official script which I want to make it
> into production???
snip
> > Diff /tmp/dev_path_PRS.DB.01.12.000 /tmp/dep_path_D.PRS.DB.01.12.000.8
snip
Diff is not a Perl command; however, there is a diff (n
On Mon, Mar 24, 2008 at 2:25 PM, Wagner, David --- Senior Programmer
Analyst --- WGO <[EMAIL PROTECTED]> wrote:
> I have a polling process that runs 24x7 ( internal site ) and for the
> most part has no problems except that they shutdown the the internal
> site every three or four weeks and my pr
Here is a diff program made in perl:
#!/usr/bin/perl
#
# `Diff' program in Perl
# Copyright 1998 M-J. Dominus. ([EMAIL PROTECTED])
#
# This program is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#
# Altered to output in `context diff' format (but
> -Original Message-
> From: Chas. Owens [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 24, 2008 11:42
> To: Wagner, David --- Senior Programmer Analyst --- WGO
> Cc: Perl Beginners
> Subject: Re: Looking for example of how to keep an FTP
> processing running if the Ip Address is down or
Gunnar Hjalmarsson wrote:
Richard Lee wrote:
say I have @data which below was pushed(bunch of them) with below
hash of hash refernce
$VAR1 = {
'element' => {
'element2' => 'now',
'element3' => '2',
Richard Lee wrote:
below is hash of hash?
No, it's not. It's a failed attempt to try to imitate what's outputted
when you use Data::Dumper to print a hash of hashes.
how do I dereference them (all of them)?
C:\home>type test.pl
my %HoH = (
'number' => {
'three' => '21',
Richard Lee wrote:
>
Gunnar Hjalmarsson wrote:
C:\home>type test.pl
use Data::Dumper;
my %HoA = (
something => [ qw/val1 val2 val3 and so forth/ ],
something2 => [ qw/vala valb valc and so forth/ ],
something3 => [ qw/valZ valZ1 valZ2 so forth/ ],
);
my %HoH;
while ( ) {
/^(\S
Richard Lee wrote:
say I have @data which below was pushed(bunch of them) with below hash
of hash refernce
$VAR1 = {
'element' => {
'element2' => 'now',
'element3' => '2',
'element4' =>
Richard Lee wrote:
>
let's say I have
@someting = qw/1 2 3 4/;
@something2 = qw/110 11 12/;
@something3 = qw/20 30 40 50/;
and I get the name of array from regular expression match something like
this from some other file
$_ =~ /^(\S+) \s\s$/;
so, now $1 is either something or somethin
Bobby wrote:
Hi all,
I'm trying to write a simple do until loop to print out the value of
> $strA0 through $striA3. What i'm doing is replacing the value of 0
> through 3 in the $strA by joining two strings (my $strB = "strA".
> $count;). Right now my script is printing $strB as below. How do i
> "Bobby" == Bobby <[EMAIL PROTECTED]> writes:
Bobby> I'm trying to write a simple do until loop to print out the value of
Bobby> $strA0 through $striA3.
If your variable names are named sequentially, you've almost always done
something wrong. Please rethink your problem, keeping data struc
kens wrote:
# Or if you must use a counter
my $count = 0;
while ( defined($strA[$count]) )
{
print "$strA[$count++]\n";
}
for my $count (0 .. $#strA) {
print "[$count] = $strA[$count]\n";
}
**OR**
my $count = 0;
foreach (@strA) {
print "[$count] = $strA[$count]\n";
$count++;
}
Hi Rob,
I've set it up just as you recommended. I also opened up the module file it
did seem that I was trying to look for a value it was not returning,
however, I could not really test if it was working or not. I could not debug
it. To me, it seemed even a little advanced. The file was not create
37 matches
Mail list logo