John W. Krahn wrote:
John W. Krahn wrote:
Toby Stuart wrote:
Hello All
Hello,
It's been almost 13 years since I last posted on this board and my
Perl skills are extremely rusty. Could someone help me to convert
this to a one liner:-
use strict;
use warnings;
while (<>) {
/^##\s*(.*)$/
John W. Krahn wrote:
Toby Stuart wrote:
Hello All
Hello,
It's been almost 13 years since I last posted on this board and my
Perl skills are extremely rusty. Could someone help me to convert
this to a one liner:-
use strict;
use warnings;
while (<>) {
/^##\s*(.*)$/ && print $1;
print "
Toby Stuart wrote:
Hello All
Hello,
It's been almost 13 years since I last posted on this board and my
Perl skills are extremely rusty. Could someone help me to convert
this to a one liner:-
use strict;
use warnings;
while (<>) {
/^##\s*(.*)$/ && print $1;
print " && " unless eof;
}
I
Great. Thankyou chenxy.
-Original Message-
From: chenxy [mailto:tin...@gmail.com]
Sent: Friday, 13 March 2009 2:01 PM
To: Toby Stuart
Cc: beginners@perl.org
Subject: Re: one liner need help
2009/3/13 Toby Stuart < toby.stu...@figtreesys.com.au>
Hello All
It's been almost 13 years s
Hi Shlomi,
Shlomi Fish wrote:
Hi all!
I've been tutoring someone in Perl 5, and as she wants to learn Perl from a
paperware book, she borrowed the book "Sams Teach Yourself Perl in 21 Days"
from her workplace's library, and started reading it. Now, all those "in 21
Days"/"in 24 hours"/"unl
Madhusudhan.v wrote:
> I am looking for a script which should get information on remote
> computers.
> please assist on this..
The mailing list archive is your friend:
http://www.mail-archive.com/beginners%40perl.org/
For example:
http://www.mail-archive.com/beginners@perl.org/msg99721
2009/3/13 Toby Stuart
> Hello All
>
> It's been almost 13 years since I last posted on this board and my Perl
> skills are extremely rusty. Could someone help me to convert this to a one
> liner:-
>
>
> use strict;
> use warnings;
>
> while (<>) {
> /^##\s*(.*)$/ && print $1;
> print " && " un
Hello All
It's been almost 13 years since I last posted on this board and my Perl skills
are extremely rusty. Could someone help me to convert this to a one liner:-
use strict;
use warnings;
while (<>) {
/^##\s*(.*)$/ && print $1;
print " && " unless eof;
}
Input file looks like this:-
On Thu, Mar 12, 2009 at 11:50:46PM +0100, "Stanisław T. Findeisen" wrote:
> Is there any way to change the values of [scalar/array] constants
> defined via "use constant" pragma?
That seems a strange thing to want to do. But useful for redefining pi, or
perhaps G, I suppose.
In general the an
Is there any way to change the values of [scalar/array] constants
defined via "use constant" pragma?
STF
===
http://eisenbits.homelinux.net/~stf/ . My PGP key fingerprint is:
9D25 3D89 75F1 DF1D F434 25D7 E87F A1B9 B80F 8062
=
On Thu, Mar 12, 2009 at 09:20, Jerry Rocteur wrote:
> Hi,
>
> I'm trying to tie this kind of hash into SDBM
>
> $hash_of_baseline{$hdr_user_name} = { user_name => $hdr_user_name,
> passwd => $hdr_user_passwd,
> ...
> ...
>
On Mar 12, 2009, at 12:52 AM, Chas. Owens wrote:
On Thu, Mar 12, 2009 at 01:27, Chap Harrison wrote:
It's still not intuitive to me why we FIRST "convert" the hash to
an array,
and THEN ask for keys - keys being hash-ish, rather than array-ish
sorts of
things. (I've said that badly.) W
Hi
On Thu, Mar 12, 2009 at 9:27 AM, Shlomi Fish wrote:
> Hi all!
>
> I've been tutoring someone in Perl 5, and as she wants to learn Perl from a
> paperware book, she borrowed the book "Sams Teach Yourself Perl in 21 Days"
> from her workplace's library, and started reading it. Now, all those "i
> -Original Message-
> From: Aglipay, Recelyn [mailto:recelyn.agli...@ehmc.com]
> Sent: Thursday, March 12, 2009 07:19
> To: Wagner, David --- Senior Programmer Analyst --- CFS;
> beginners@perl.org
> Subject: RE: Network Printing using a Perl Script
>
> Hi Dave,
>
> I'm using a third p
Thanks John,
The missing ! was the trick. I knew it had to be something stupid. Adding
that and using SYSTEM which I incorrectly thought was unavailable made
everything work.
Now onto bigger and better things.
Neal
On Wed, Mar 11, 2009 at 4:35 PM, Aglipay, Recelyn
wrote:
> Hello everyone,
>
>
>
> I'm a beginner and having some issues with a Perl Script I had written
> for work.
>
> I am trying to print to a network label printer. I've verified that the
> printer is working on its own.
>
> But when I try to
On 3/12/09 Thu Mar 12, 2009 6:18 AM, "Aglipay, Recelyn"
scribbled:
> Hi Dave,
>
> I'm using a third party application to call the perl script. This
> application only allows for subroutines to be written since the app also
> uses some perl. So the code below is all I have. My goal was to op
Hi all!
I've been tutoring someone in Perl 5, and as she wants to learn Perl from a
paperware book, she borrowed the book "Sams Teach Yourself Perl in 21 Days"
from her workplace's library, and started reading it. Now, all those "in 21
Days"/"in 24 hours"/"unleashed"/"for Dummies"/etc. books te
"Jim Gibson" wrote in message
news:c5dd973f.4740%jimsgib...@gmail.com...
> On 3/11/09 Wed Mar 11, 2009 11:36 AM, "neckha...@penntraffic.com"
> scribbled:
>
Thanks Jim,
The missing ! was the key. I knew it had to be something stupid.
The capitalization of the commands was just to differenti
Hi,
I'm trying to tie this kind of hash into SDBM
$hash_of_baseline{$hdr_user_name} = { user_name => $hdr_user_name,
passwd=> $hdr_user_passwd,
...
...
groups => [ @info_group_names ] };
I can store it but when
Dermot wrote:
Dr.Ruud:
Dermot:
my $instance = new MyClass;
my $instance = MyClass->new;
MyClass::->new
MyClass::->new()
So do they all amount to the same thing?
Fundamentally not.
In many practical situations they behave about the same. Until they don't.
The last one is the mo
Hi,
I'm trying to tie this kind of hash into SDBM
$hash_of_baseline{$hdr_user_name} = { user_name => $hdr_user_name,
passwd=> $hdr_user_passwd,
...
...
groups => [ @info_group_names ] };
I can store it but when
Hi,
I thought: 'perl is pretty eclectic, and it's usually simpler than it looks'.
Let's give it a try:
The following does what you want from an AIX 5.3 (perl 5.8.2) command line
perl -e'print system("ls -l")'
These are quotes and apostrophes. No "backticks."
On 3/11/09 2:36 PM, "neckha...
Hi Dave,
I'm using a third party application to call the perl script. This
application only allows for subroutines to be written since the app also
uses some perl. So the code below is all I have. My goal was to open
the directory which contains .dat files. Print all of them to the
printer.
I
monnappa appaiah wrote:
Gunnar Hjalmarsson wrote:
monnappa appaiah wrote:
I"m sorry for starting the new threadi tried to
understand the solution but i couldn't understand much from it, i
have used the used eval to trap errors but after that i couldn't
understand as i'm new to perl
can u suggest me some book or material from which i can understand some
advance concepts of perl...i'm refering to learning perl
On Thu, Mar 12, 2009 at 3:53 PM, Gunnar Hjalmarsson wrote:
> monnappa appaiah wrote:
>
>> I"m sorry for starting the new threadi tried to understand the
>>
2009/3/12 Deviloper
> Can somebody explain what Backtracking is?
>
> thanx,
> B.
>
In a nutshell, consider the following regex: /foo((b+)ar)/
a regex engine will check every character in the string that is
checked against until it reaches the first "f". When reached, it will
mark the place and ch
This may sound a little bit stupid, but I never ask about "what is up with this
regexps behind the curtain". I was lucky when they did what I was expecting...
But I´m getting old and want to know more. Can somebody explain what
Backtracking is?
thanx,
B.
monnappa appaiah wrote:
I"m sorry for starting the new threadi tried to understand the
solution but i couldn't understand much from it, i have used the used eval
to trap errors but after that i couldn't understand as i'm new to
perl
Maybe the task you are trying to accomplish is somewha
On Feb 6, 2:02 pm, perl...@gmail.com (Perl Pra) wrote:
> Hi
Hi
I am looking for a script which should get information on remote
computers.
please assist on this..
Best regards
Madhusudhan.v
> I have a pel script I want to execute this perl script on remote machine
> and get the information r
Kammen van, Marco, Springer SBM NL wrote:
Hi All,
Hello,
I'm trying to generate random sentences using a few words, but can't get
the thing to work..
I know I'm doing something wrong but what? :-D
Any help is appreciated!
#!/usr/bin/perl -w
#!/usr/bin/perl
use warnings;
use strict;
On Thu, Mar 12, 2009 at 03:40, Kammen van, Marco, Springer SBM NL
wrote:
> Hi All,
>
>
>
> I'm trying to generate random sentences using a few words, but can't get
> the thing to work..
>
> I know I'm doing something wrong but what? :-D
>
>
>
> Any help is appreciated!
>
>
>
>
>
> #!/usr/bin/p
Hi Gunnar,
I don't get 132 unable to connect host message.but
i get this error message
Can't call method "exec" on an undefined value at
C:\perl-scripts\new_test\test.pl line 22, <$input> line 48.
I noted an another interesting thing, if i run the same script for the
se
Hi All,
I'm trying to generate random sentences using a few words, but can't get
the thing to work..
I know I'm doing something wrong but what? :-D
Any help is appreciated!
#!/usr/bin/perl -w
#
my $count = "0";
my $word0 = "aap";
my $word1 = "nood";
my $word2 = "mies
34 matches
Mail list logo