Re: Writing functions like MAP

2010-07-06 Thread Uri Guttman
> "SCT" == Srinivasa Chaitanya T writes: SCT> How can I write functions which accept block as an argument? SCT> Basically I want to create a function with like which just SCT> executes the block and doesn't create an array. this is one of the few places where perl's prototypes are use

Writing functions like MAP

2010-07-06 Thread Srinivasa Chaitanya T
Hi, How can I write functions which accept block as an argument? Basically I want to create a function with like which just executes the block and doesn't create an array. -- T Srinivasa Chaitanya

Re: adding \n?

2010-07-06 Thread Jeff Pang
-Original-Nachricht- > Subject: adding \n? > Date: Wed, 07 Jul 2010 05:30:14 +0200 > From: Noah > To: Perl Beginners > Hi there, > > I want to add '\n' to each element of @contact_list. > what are my options for doing so? > Hi, Perl's map function does that for you. $ perl -e '@x=

Re: adding \n?

2010-07-06 Thread John W. Krahn
Noah wrote: Hi there, Hello, I want to add '\n' to each element of @contact_list. what are my options for doing so? I assume by "add" you mean append? Or do you want to add it somewhere else in the string? here is the line my @contact_list = sort keys %contacts; snip ---

adding \n?

2010-07-06 Thread Noah
Hi there, I want to add '\n' to each element of @contact_list. what are my options for doing so? here is the line my @contact_list = sort keys %contacts; snip - -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org

Re: ipc::run

2010-07-06 Thread Shlomi Fish
On Monday 05 Jul 2010 03:59:26 Unknown User wrote: > Hi all, > > I have written a script that uses ipc::run on an array, like this, > based on a previous post here: > > m...@host101: cat ipc > #!/usr/bin/perl -w > use strict; > use IPC::Run qw/run/; > my (@hosts,@cmd,$task); > @hosts = qw/localho

Re: How to become a perl architect !

2010-07-06 Thread Chas. Owens
On Fri, Jul 2, 2010 at 12:56, Dr.Ruud wrote: > Peter Scott wrote: >> >> On Fri, 02 Jul 2010 09:34:05 +, Amit Saxena wrote: > >>> I have around 6+ years of IT experience as a software development >>> mailing in scripting technologies using perl. >>> >>> I want to become technical architect in p

Re: Getting ethernet inforamtion using ioctl

2010-07-06 Thread mud_saisem
On Jul 2, 1:08 pm, mud_sai...@hotmail.com (mud_saisem) wrote: > Hi, > > I am trying to write a Perl script that will get the ip address of a > ethernet card using ioctl. > > Could somebody please give me a hand. I am guessing that the section > where I try to pack my ethernet device is where I am g

Re: [Milan-pm] A recipe was rewritten

2010-07-06 Thread marcos rebelo
Hy all I consider a beginner, someone with less then 3 years hands in the job. The website is think to the developers with 1 year experience. If you never saw Perl in your live, you don't need a recipe that teaches you how to solve a specific problem. You need to read the Begging Perl and the Pr

Re: getopt::long

2010-07-06 Thread Octavian Rasnita
or additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ __ Information from ESET NOD32 Antivirus, version of virus signature database 5254 (20100706) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __ Information from ESE

Re: [Milan-pm] A recipe was rewritten

2010-07-06 Thread Giulio Bertani
Hi Marcos, I sow some recipe : A lot of job but useful only for know already how to do thing and it's looking for doing it better ... I think it's better to speak about strategy for beginner at Perl Monger Meeting. Bye Giulio 2010/7/3 marcos rebelo > Hy all > > There was some discussion in the

ipc::run

2010-07-06 Thread Unknown User
Hi all, I have written a script that uses ipc::run on an array, like this, based on a previous post here: m...@host101: cat ipc #!/usr/bin/perl -w use strict; use IPC::Run qw/run/; my (@hosts,@cmd,$task); @hosts = qw/localhost localhost host101/; foreach my $host (@hosts) { $task = sub {

Re: A recipe was rewritten

2010-07-06 Thread marcos rebelo
On Sat, Jul 3, 2010 at 4:00 PM, Dr.Ruud wrote: > marcos rebelo wrote: > >> There was some discussion in the recipe, so I rewrite it: >> >> >> http://sites.google.com/site/oleberperlrecipes/recipes/05-io/02-slurp-a-file >> >> Please comment this ore any other recipe. >> >> Remember that you may als

Re: How to become a perl architect !

2010-07-06 Thread Dr.Ruud
Peter Scott wrote: On Fri, 02 Jul 2010 09:34:05 +, Amit Saxena wrote: I have around 6+ years of IT experience as a software development mailing in scripting technologies using perl. I want to become technical architect in perl. Please help me / suggest me / guide me on how should I start.

getopt::long

2010-07-06 Thread Unknown User
um, I am pretty sure getopt::long keeps all input data in a hash, does anybody know whether i can use that hash itself in my code, and if so, how? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: regex question

2010-07-06 Thread Shlomi Fish
On Friday 02 Jul 2010 17:29:27 Dr.Ruud wrote: > sdDirtySox wrote: > > I want to use a perl script that will look at all the files in a > > directory to find an instance of a function and replace it with > > another. I have the code in place to look at all the files in a > > directory and to search