Re: split function

2011-12-16 Thread Shlomi Fish
Hi Chris, On Thu, 15 Dec 2011 15:29:08 -0600 Chris Stinemetz chrisstinem...@gmail.com wrote: Is that your company's policy, or do you just lack root access? If it's the latter, then see the various resources at http://perl-begin.org/topics/cpan/ , so you can see how to install Perl

Re: error on Net::SSH::perl ---- [ weaken is only available with the XS version of Scalar::Util ]

2011-12-16 Thread Shlomi Fish
Hi Agnello, On Mon, 12 Dec 2011 18:36:00 +0530 Agnello George agnello.dso...@gmail.com wrote: Compilation failed in require at download_db_4_syncscript.pl line 7. BEGIN failed--compilation aborted at download_db_4_syncscript.pl line 7. any idea what went wrong .. thanks for all the help

Re: Guidance for a New Programmer/Perl User

2011-12-16 Thread Shlomi Fish
On Thu, 15 Dec 2011 13:53:33 -0800 (PST) Rajeev Prasad rp.ne...@yahoo.com wrote: Shlomi, all of you said is correct, but some may get a negative impression. it shows as if perl5 and perl 6 are two very different. Well, Perl 5 and Perl 6 are very different. perl5 is dead end (coz perl 6 is

Re: Guidance for a New Programmer/Perl User

2011-12-16 Thread Ken Peng
2011/12/16 Shlomi Fish shlo...@shlomifish.org: Regarding Perl 6 - you are right that it is taking a long time, and that some people feel its implementations are not usable for them yet. But it doesn't mean you can't use Perl 5 now, or that Perl 6 will never be ready, or that it didn't have a

Re: Guidance for a New Programmer/Perl User

2011-12-16 Thread Shlomi Fish
Hi Rob, On Thu, 15 Dec 2011 22:27:22 + Rob Dixon rob.di...@gmx.com wrote: Decades of programming in many languages have convinced me that Perl excels in every aspect. But I have to agree with Rajeev that Perl 6 has become a theory and needs evidence of practical application. In my mind

Re: split function

2011-12-16 Thread shawn wilson
On Thursday, December 15, 2011, Chris Stinemetz chrisstinem...@gmail.com wrote: It isn't a company policy just circumstance. The unix box I'm using doesn't support DNS nameserver lookup or a C compiler. I'm currently using Perl 5.6.1 which doesnt' support local::lib and I can't install

Re: Guidance for a New Programmer/Perl User

2011-12-16 Thread Mark Tiesman
Not to sound like I am complaining, but aren't we kind of wondering of my original topic? I will say that Perl 5 is the road I need to travel since it is heavily utilized here at the University. I do want to say thank you for the links at other reading recommendations that have been provided

Re: Guidance for a New Programmer/Perl User

2011-12-16 Thread John SJ Anderson
On Friday, December 16, 2011 at 09:18 , Mark Tiesman wrote: Not to sound like I am complaining, but aren't we kind of wondering of my original topic? I will say that Perl 5 is the road I need to travel since it is heavily utilized here at the University. Yes, parts of the discussion have

Custom Perl on Debian

2011-12-16 Thread Phil Dobbin
Hi, all. Has anybody have any experiences of installing a dev version of Perl into /usr/local on Debian (I'm running Squeeze)? My custom version on OS X works just fine after Googling the matter of doing the same on Debian there isn't really any consensus on the subject. Any help appreciated.

Re: Custom Perl on Debian

2011-12-16 Thread Shlomi Fish
Hi Phil, On Fri, 16 Dec 2011 14:41:52 + Phil Dobbin phildob...@gmail.com wrote: Hi, all. Has anybody have any experiences of installing a dev version of Perl into /usr/local on Debian (I'm running Squeeze)? My custom version on OS X works just fine after Googling the matter of

Re: Custom Perl on Debian

2011-12-16 Thread Phil Dobbin
On 16/12/11 14:55, Shlomi Fish shlo...@shlomifish.org wrote: On Fri, 16 Dec 2011 14:41:52 + Phil Dobbin phildob...@gmail.com wrote: Has anybody have any experiences of installing a dev version of Perl into /usr/local on Debian (I'm running Squeeze)? My custom version on OS X works

Re: Guidance for a New Programmer/Perl User

2011-12-16 Thread Chankey Pathak
On Dec 16, 3:39 pm, short...@gmail.com (Ken Peng) wrote: 2011/12/16 Shlomi Fish shlo...@shlomifish.org: Regarding Perl 6 - you are right that it is taking a long time, and that some people feel its implementations are not usable for them yet. But it doesn't mean you can't use Perl 5

Re: split function

2011-12-16 Thread thebarn...@gmail.com
split() splits on whitespace by default. so the \s+/ is optional. $_ = 3 element array; @words = split; -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: ipc question

2011-12-16 Thread thebarn...@gmail.com
On Dec 14, 6:42 pm, oiss...@gmail.com (Tessio Fechine) wrote: Hello, I have a cgi application that has a two way communication with a ldap application via open2: |home.cgi|  ===  |ldap.pl| I need to keep communicating with the same ldap.pl process as other cgi scripts are launched:

Replace words in a file using perl script

2011-12-16 Thread Melvin
Hi, I am a Perl baby :-) I was trying to write a script to replace baby to bigboy in a file:- However the below script doesn't work Could someone help me??? #!/usr/bin/perl -w use strict; open (FILE_IN , $ARGV[0]) || die (ERROR: Gimme Input pleease); my @array_of_lines = FILE_IN; foreach my

Re: Replace words in a file using perl script

2011-12-16 Thread Jim Gibson
On 12/15/11 Thu Dec 15, 2011 7:36 AM, Melvin whereismel...@gmail.com scribbled: Hi, I am a Perl baby :-) I was trying to write a script to replace baby to bigboy in a file:- However the below script doesn't work Could someone help me??? The problem with your script is that you are not

RE: Replace words in a file using perl script

2011-12-16 Thread Kronheim, David (Contr)
Hi Melvin, It looks like you're editing each line but not writing back to the file, add some print's or say's for $line to see what's happening. Sincerely, David Kronheim Production Support Tier II Gateway Error Correction, VZ450 EDI, EDI Billing, Metakey/LIA 484-213-1315

Re: Replace words in a file using perl script

2011-12-16 Thread Chris Stinemetz
Hello Melvin, Give this a try. I used the advice Jim gave and this is what I came up with. It seems to do what you are asking for. #!/usr/bin/perl use warnings; use strict; my $inFile = input.txt; my $outFile = output.txt; open my $fin, '', $inFile or die ERROR opening $inFile: $!; open my

Re: Replace words in a file using perl script

2011-12-16 Thread Uri Guttman
On 12/16/2011 03:23 PM, Chris Stinemetz wrote: Hello Melvin, Give this a try. I used the advice Jim gave and this is what I came up with. It seems to do what you are asking for. #!/usr/bin/perl use warnings; use strict; my $inFile = input.txt; my $outFile = output.txt; open my $fin, '',

Re: Guidance for a New Programmer/Perl User

2011-12-16 Thread David Christensen
On 12/15/2011 11:34 PM, abhay vyas wrote: Which book of Llama are you reading? pls tell me the title as I am also on same page as yors. I read Learning Perl, 2 e., ~13 years ago. David -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail:

Re: split function

2011-12-16 Thread Chris Stinemetz
However I think it's more likely that you need /all/ of the data to be output, so I suggest something like my program below. HTH, Rob use strict; use warnings; my @headers; while (DATA) {  if (@headers) {    my @data = split;    for my $i (0 .. $#headers) {      printf %s=%s\n,

Re: Replace words in a file using perl script

2011-12-16 Thread Brandon McCaig
On Thu, Dec 15, 2011 at 07:36:37AM -0800, Melvin wrote: Hi, Hello: I was trying to write a script to replace baby to bigboy in a file:- However the below script doesn't work Could someone help me??? #!/usr/bin/perl -w use strict; open (FILE_IN , $ARGV[0]) || die (ERROR: Gimme Input