my $value = 3; sub suffix_0 { my $c = $_[0] - length($_[1]); if ($c>0) { my $result = $value . '0'x$c; return $result; } return $_[1]; } print suffix_0(5,...
27408
Shlomi Fish
shlomif2
Nov 8, 2012 1:38 pm
Hi Huangj, a few comments on your code. On Thu, 8 Nov 2012 20:40:25 +0800 (CST) ... $value is global to the subroutine. That's not good. ... You should not use...
27409
merlyn@...
merlynstoneh...
Nov 8, 2012 1:47 pm
... Huangj> my $value = 3; Huangj> sub suffix_0 { Huangj> my $c = $_[0] - length($_[1]); Huangj> if ($c>0) { Huangj> my $result = $value . '0'x$c; Huangj>...
27410
Huangj
redspid@...
Nov 9, 2012 6:50 am
I am glad that my code received so many replies. I learn from your suggestions to learn many things. Thank you. so, i will coding more code, post to the...
27411
Ignacio
ignafiuba
Nov 10, 2012 6:18 pm
I have been trying to install Padre on Windows 7 with Strawberry Perl using 'cpan Padre' and 'cpanm Padre', but many dependencies fail to install. First, I...
27412
Thiago Nascimento
nascimentoth...
Nov 28, 2012 5:08 pm
Hi, I'm a newbie Catalyst framework user, and I'm trying to use inheritance between two templates. I'm using the Template::Toolkit. But it's not working. Could...
27413
Md. Musfique Anwar
newton897
Nov 29, 2012 2:42 am
Hi, I want to know is there any way to detect duplicate keys in hash. I have a CDB database and from that I create hash and the hash contains duplicate keys. I...
27414
timothy adigun
eternity8008
Nov 29, 2012 7:06 am
Hi, Please see my comments below. On Thu, Nov 29, 2012 at 3:42 AM, Md. Musfique Anwar < ... *Hash in Perl don't allow duplicate keys*, though can have...
27415
perl-beginner@yahoogr...
Dec 1, 2012 8:55 am
Good day, This Perl-Beginner group was set up for people to learn about the Perl language, and how it may be used in their websites. Although there are...
27416
siddhartha singh
sid12_jaipushp
Dec 2, 2012 3:14 pm
hi, Could you please send me links, where i can find problems , so sharpen my perl skills, like excercixes etc thanks! ________________________________ From:...
27417
Rob Richardson
interrobang
Dec 2, 2012 3:22 pm
What did you find from a Google search? RobR On Sun, Dec 2, 2012 at 8:31 AM, siddhartha singh...
27418
Shlomi Fish
shlomif2
Dec 2, 2012 9:08 pm
Hi Siddhartha, On Sun, 2 Dec 2012 21:31:41 +0800 (SGT) ... See: http://perl-begin.org/exercises/ Regards, Shlomi Fish ... -- ... Shlomi Fish...
27420
perl-beginner@yahoogr...
Jan 1, 2013 8:58 am
Good day, This Perl-Beginner group was set up for people to learn about the Perl language, and how it may be used in their websites. Although there are...
27421
Bilashi Sahu
bilashi_sahu
Jan 9, 2013 2:14 pm
Hello, I'm sorry for not informing you about our trip to Manila Philippines.We had to visit a resort in Manila Philippines,Unfortunately we got mugged at GUN...
27422
Charles K. Clarkson
charlesclarkson
Jan 10, 2013 2:00 am
Ah. The classics are the best. Charles Clarkson -- I'm not really a smart person. I just play one on the Internet....
27423
Noah
noah@mci.net
Jan 16, 2013 10:59 pm
Hi there, I am trying to remove all the values in @ignore_routers from the @devices array. %hostnames is where the entire list of hostnames reside. Is there...
27424
Matthew K
matt_hew.rm
Jan 17, 2013 1:37 am
The most efficient way to do it, would be to use a hash of hashes initially, and use keys like "ignored" and values of one or zero in the value of the...
27425
Charles K. Clarkson
charlesclarkson
Jan 17, 2013 5:50 am
... Instead of ignoring the routers in @devices, you might ignore the routers in %hostnames and then retrieve the routers in @devices. my %devices =...
27426
warrengallin
Jan 19, 2013 11:51 pm
I am having a problem with some lines of text matching my regular expression, but the captured parts of the match are not defined. Attached is a minimal...
27427
timothy adigun
eternity8008
Jan 20, 2013 12:45 am
Hi warrengallin, Please check my comments below: ... suggest using Perl function *split, *like so, to solve this: #!/usr/bin/perl use strict; use warnings; my...
27428
Oral Akkan
oral_akkan
Jan 20, 2013 2:10 am
Hi Just use this one and write again if it does not work. I cannot test it for you, because in the originat text you must have tabulator (\t) and I see here...
27429
Warren Gallin
warrengallin
Jan 20, 2013 2:10 am
Tim, That worked perfectly. Although I am curious about the reason for the regex approach failing, your suggestions makes my script work, which is the most...
27430
Jenda Krynicky
jendaperl
Jan 21, 2013 1:04 am
From: "warrengallin" <wgallin@...> ... The line above is the problem. The $1 and friends contain the data from the last successful regexp match and...
27431
Warren Gallin
warrengallin
Jan 21, 2013 3:58 am
Thanks, that explains it - I'll keep this in mind in the future. Warren Gallin...
27432
afbach1
Jan 21, 2013 8:59 pm
if ($temp_in =~ m/^(WJG\d{4})\t([^\t]*)\t([^\t]*)\t([^\t]*)\t/){ print "Match is:\n $&\n"; my $sequence = $4; $sequence =~ tr/[a-z]/[A-Z]/; $sequence =~...
27433
perl-beginner@yahoogr...
Feb 1, 2013 9:52 am
Good day, This Perl-Beginner group was set up for people to learn about the Perl language, and how it may be used in their websites. Although there are...
27434
Paul.G
medura43
Feb 7, 2013 3:12 pm
Hey http://www.isasecurite.com/nlmrf/m6lunawy0.png Paul.G 2/7/2013 4:12:17 PM [Non-text portions of this message have been removed]...
27435
davebest99
Feb 13, 2013 5:34 am
Hi! I have a "red herring" that is driving me crazy. I found your comment, and hope you can help. I have a Yahoo Small Business web page with a <form> that...
27436
Charles K. Clarkson
charlesclarkson
Feb 14, 2013 2:06 am
... The language is named Perl, never PERL. ... I think you mean a JavaScript script. Java is a vastly different programming language than JavaScript. ... ...
27437
afbach1
Feb 15, 2013 1:03 am
... script works fine until I include a Java \n"; A Java "\n"? (really - it's a "Perl script" - that upper case is like fingernails on the blackboard). But not...