module for development
Hello, Which module could show the order of loading modules? For example, use Foo; use Bar; BEGIN { require A; } I want to know in what order Perl loads these modules. Thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: module for development
Strace stat(64) should do you. On Dec 15, 2011 8:03 AM, Ken Peng short...@gmail.com wrote: Hello, Which module could show the order of loading modules? For example, use Foo; use Bar; BEGIN { require A; } I want to know in what order Perl loads these modules. Thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: module for development
On Thu, Dec 15, 2011 at 10:09 AM, shawn wilson ag4ve...@gmail.com wrote: Strace stat(64) should do you. On Dec 15, 2011 8:03 AM, Ken Peng short...@gmail.com wrote: Hello, Which module could show the order of loading modules? For example, use Foo; use Bar; BEGIN { require A; } I want to know in what order Perl loads these modules. Thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ The order is Foo, Bar, A; Figuring it out without a module is pretty simple if you know that use is actually roughly the same as saying BEGIN { require Foo; Foo-import(); } And you know from reading the documentation (perlmod, I think) that BEGIN blocks are run in FIFO order -- So the first one seen is run fist, then the second, and so on. But, assuming that you have a truly preposterous amount of modules loading from everywhere and can't check manually, you can actually ask Perl to tell you. There's probably a module on CPAN for this, so this is superfluous, but it's a nice enough exercise. There's two options. An @INC hook, or overriding *CORE::GLOBAL::require. Both have horrible caveats, so this is not something you should use in production unless you know very well what you are doing. The latter is pretty simple: BEGIN { *CORE::GLOBAL::require = sub { say [@_]; CORE::require(@_) } } And while that will tell you the order alright, it'll break pretty soon if one of your modules rather rightfully also asks for a minimum version number, like: use List::Util v1; The second way is using an @INC hook, which is explained in perldoc -f require. Here's a pretty simple form: BEGIN { unshift @INC, sub { say @_[0..$#_]; return } } But the real question here is, why do you need to know this?
Re: module for development
2011/12/15 Brian Fraser frase...@gmail.com: The second way is using an @INC hook, which is explained in perldoc -f require. Here's a pretty simple form: BEGIN { unshift @INC, sub { say @_[0..$#_]; return } } But the real question here is, why do you need to know this? Thanks Brian, your info is much helpful. My real question is, for example, for the source of my module Net::Evernote: http://cpansearch.perl.org/src/YHPENG/Net-Evernote-0.02/lib/Net/Evernote.pm BEGIN { my $module_dir = $INC{'Net/Evernote.pm'}; $module_dir =~ s/Evernote\.pm$//; unshift @INC,$module_dir; } This begin block setup the @INC by adding a path as the module itself, it does work. I was thinking once Perl praser sees the file of this module existing in the filesystem, it will update the @INC, am I right? Otherwise if Perl only update the @INC after reading all the file, the following statement will fail: use EDAMUserStore::UserStore; use EDAMUserStore::Types; use EDAMNoteStore::NoteStore; use EDAMNoteStore::Types; use EDAMErrors::Types; use EDAMLimits::Types; use EDAMTypes::Types; Since these modules exist in the same library dir as Evernote.pm. (in my OS it's /usr/local/share/perl/5.10.0/Net/Evernote.pm) But their names are not began with Net::“ as they should be. (in my OS, they are /usr/local/share/perl/5.10.0/Net//EDAMUserStore/Types.pm etc). This seems a Chicken-egg question, but my solution does work... Any futher suggestion? Thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: module for development
On Thu, Dec 15, 2011 at 09:02, Ken Peng short...@gmail.com wrote: 2011/12/15 Brian Fraser frase...@gmail.com: Since these modules exist in the same library dir as Evernote.pm. (in my OS it's /usr/local/share/perl/5.10.0/Net/Evernote.pm) But their names are not began with Net::“ as they should be. (in my OS, they are /usr/local/share/perl/5.10.0/Net//EDAMUserStore/Types.pm etc). hence why i recommended strace so that you could see where perl looks for modules and in what order. that said, if someone has a way inside perl to do the same thing, it might be cool to know. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: module for development
2011/12/15 shawn wilson ag4ve...@gmail.com: hence why i recommended strace so that you could see where perl looks for modules and in what order. that said, if someone has a way inside perl to do the same thing, it might be cool to know. Yup I did the strace as you suggested and got some useful stuff. Thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: module for development
From: Brian Fraser frase...@gmail.com On Thu, Dec 15, 2011 at 10:09 AM, shawn wilson ag4ve...@gmail.com wrote: Strace stat(64) should do you. On Dec 15, 2011 8:03 AM, Ken Peng short...@gmail.com wrote: Hello, Which module could show the order of loading modules? For example, use Foo; use Bar; BEGIN { require A; } I want to know in what order Perl loads these modules. The order is Foo, Bar, A; Is it? What if Foo uses A? Jenda = je...@krynicky.cz === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: module for development
On Thu, Dec 15, 2011 at 11:02 AM, Ken Peng short...@gmail.com wrote: 2011/12/15 Brian Fraser frase...@gmail.com: The second way is using an @INC hook, which is explained in perldoc -f require. Here's a pretty simple form: BEGIN { unshift @INC, sub { say @_[0..$#_]; return } } But the real question here is, why do you need to know this? Thanks Brian, your info is much helpful. My real question is, for example, for the source of my module Net::Evernote: http://cpansearch.perl.org/src/YHPENG/Net-Evernote-0.02/lib/Net/Evernote.pm BEGIN { my $module_dir = $INC{'Net/Evernote.pm'}; $module_dir =~ s/Evernote\.pm$//; unshift @INC,$module_dir; } This begin block setup the @INC by adding a path as the module itself, it does work. I was thinking once Perl praser sees the file of this module existing in the filesystem, it will update the @INC, am I right? Otherwise if Perl only update the @INC after reading all the file, the following statement will fail: Hm, that's not quite right. It updates %INC as soon as it can open a filehandle and start reading, but I don't think it ever updates @INC unless you ask it to (e.g. by 'use lib' or -I on the command line, or mucking with it manually). use EDAMUserStore::UserStore; use EDAMUserStore::Types; use EDAMNoteStore::NoteStore; use EDAMNoteStore::Types; use EDAMErrors::Types; use EDAMLimits::Types; use EDAMTypes::Types; Since these modules exist in the same library dir as Evernote.pm. (in my OS it's /usr/local/share/perl/5.10.0/Net/Evernote.pm) But their names are not began with Net::“ as they should be. (in my OS, they are /usr/local/share/perl/5.10.0/Net//EDAMUserStore/Types.pm etc). This seems a Chicken-egg question, but my solution does work... Any futher suggestion? Well, why do you have those private packages? If they are useful on their own, it would make more sense to just install them in their own directories. For point of reference, I think that this is what List-Scalar-Utils does.
Re: module for development
On 11-12-15 09:02 AM, Ken Peng wrote: BEGIN { my $module_dir = $INC{'Net/Evernote.pm'}; $module_dir =~ s/Evernote\.pm$//; unshift @INC,$module_dir; } This begin block setup the @INC by adding a path as the module itself, it does work. Try this instead (no BEGIN needed): package Net::Evernote; use File::Basename; # must be before `use lib` use lib dirname( $INC{ __PACKAGE__ . '.pm' } ); -- Just my 0.0002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. Never give up your dreams. Give up your goals, plans, strategy, tactics, and anything that's not working but never give up your dreams. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: module for development
On Thu, Dec 15, 2011 at 12:00 PM, Shawn H Corey shawnhco...@gmail.comwrote: On 11-12-15 09:02 AM, Ken Peng wrote: BEGIN { my $module_dir = $INC{'Net/Evernote.pm'}; $module_dir =~ s/Evernote\.pm$//; unshift @INC,$module_dir; } This begin block setup the @INC by adding a path as the module itself, it does work. Try this instead (no BEGIN needed): package Net::Evernote; use File::Basename; # must be before `use lib` use lib dirname( $INC{ __PACKAGE__ . '.pm' } ); Close, but that won't work, because keys in %INC are paths, and you are still leaving the ::'s unchanged. use 5.014; use File::Basename; # must be before `use lib` use lib dirname( $INC{ __PACKAGE__ =~ s!::!/!r . '.pm' } ); That should do. Plus more mangling if you don't use /r :)
Re: module for development
Hm, that's not quite right. It updates %INC as soon as it can open a filehandle and start reading, but I don't think it ever updates @INC unless you ask it to (e.g. by 'use lib' or -I on the command line, or mucking with it manually). sorry my typo. it is %inc not @inc. if perl updates %inc as soon as it open and begin read the file, then it explain my question. thanks. use EDAMUserStore::UserStore; use EDAMUserStore::Types; use EDAMNoteStore::NoteStore; use EDAMNoteStore::Types; use EDAMErrors::Types; use EDAMLimits::Types; use EDAMTypes::Types; Since these modules exist in the same library dir as Evernote.pm. (in my OS it's /usr/local/share/perl/5.10.0/Net/Evernote.pm) But their names are not began with Net::“ as they should be. (in my OS, they are /usr/local/share/perl/5.10.0/Net//EDAMUserStore/Types.pm etc). This seems a Chicken-egg question, but my solution does work... Any futher suggestion? Well, why do you have those private packages? If they are useful on their own, it would make more sense to just install them in their own directories. For point of reference, I think that this is what List-Scalar-Utils does.
Re: module for development
On 11-12-15 10:09 AM, Brian Fraser wrote: Close, but that won't work, because keys in %INC are paths, and you are still leaving the ::'s unchanged. use 5.014; use File::Basename; # must be before `use lib` use lib dirname( $INC{ __PACKAGE__ =~ s!::!/!r . '.pm' } ); That should do. Plus more mangling if you don't use /r :) Oops. You're right. Didn't test that case. Sorry. Not that this is not a wise thing to do. -- Just my 0.0002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. Never give up your dreams. Give up your goals, plans, strategy, tactics, and anything that's not working but never give up your dreams. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: ipc question
On Wed, 14 Dec 2011 20:42:10 -0300, Tessio Fechine wrote: I have a cgi application that has a two way communication with a ldap application via open2: I need to keep communicating with the same ldap.pl process as other cgi scripts are launched: Sounds like you want a named pipe. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/certificates/perl-programming.php -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: module for development
Hi Ken, On Thu, 15 Dec 2011 21:01:28 +0800 Ken Peng short...@gmail.com wrote: Hello, Which module could show the order of loading modules? For example, use Foo; use Bar; BEGIN { require A; } I want to know in what order Perl loads these modules. See: http://search.cpan.org/dist/Devel-TraceUse/ Regards, Shlomi Fish -- - Shlomi Fish http://www.shlomifish.org/ First stop for Perl beginners - http://perl-begin.org/ We have nothing to fear but fear itself. Fear has nothing to fear but XSLT. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: split function
I'm getting a bit closer. There a couple roadblocks I am up against. I am able to split the lines by white space, but for some reason the program isn't capturing the first lines to the @fieldValue array after the @headerNames array. Once I get all the lines to go into the array correctly I would like to combine the @headerNames and @fieldValue arrays. The way I am doing it now only appends the later. I would like the combination to be the below for each elements in the two arrays. any help is greatly appreciated, Chris csno=1 rfpi=1 header_1=5.5 header_2=5.5 header_3=5.5 header_4=5.5 header_5=5.5 header_6=5.5 header_7=5.5 header_8=5.5 header_9=5.5 #!/usr/bin/perl use warnings; use strict; use Data::Dumper; my $header; my @headerNames; my $field; my @fieldValue; my @apxScript; while (my $line = DATA) { if($line =~ m|(.*_.*\n)|){ $header = $1; @headerNames = split( ,$header); } if($line !~ m|.*_.*\n|){ @fieldValue = split( ,$line); print $fieldValue[0]\n; } } my @apxScript=(@headerNames, @fieldValue); print Dumper \@headerNames; print Dumper \@fieldValue; print Dumper \@apxScript; __DATA__ csno rfpi header_1 header_2 header_3 header_4 header_5 header_6 header_7 header_8 header_9 1 1 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 2 2 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 3 3 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 4 1 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5 2 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 6 3 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 7 1 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 8 2 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 9 3 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 10 1 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 11 2 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 12 3 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Guidance for a New Programmer/Perl User
Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. Thanks!! -- Mark -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
Thanks Frank. I'll add that to my list. ;-) Mark On 12/15/2011 10:07 AM, frank cui wrote: I found Perl By Example 4th Edition book pretty help, and you may want to give a look on that one. Frank On Thu, Dec 15, 2011 at 11:54 AM, Mark Tiesman mark.ties...@doit.wisc.edu mailto:mark.ties...@doit.wisc.edu wrote: Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. Thanks!! -- Mark -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org mailto:beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org mailto:beginners-h...@perl.org http://learn.perl.org/ -- Mark C. Tiesman Campus Network Services Division of Information Technology (DoIT) University of Wisconsin - Madison 1210 W Dayton St Rm B116 608.264.4357 - Help Desk 608.890.3940 - Office ties...@wisc.edu
RE: split function
-Original Message- From: Chris Stinemetz [mailto:chrisstinem...@gmail.com] Sent: Thursday, December 15, 2011 10:47 AM To: John W. Krahn Cc: Perl Beginners Subject: Re: split function I'm getting a bit closer. There a couple roadblocks I am up against. I am able to split the lines by white space, but for some reason the program isn't capturing the first lines to the @fieldValue array after the @headerNames array. Once I get all the lines to go into the array correctly I would like to combine the @headerNames and @fieldValue arrays. The way I am doing it now only appends the later. I would like the combination to be the below for each elements in the two arrays. any help is greatly appreciated, Chris csno=1 rfpi=1 header_1=5.5 header_2=5.5 header_3=5.5 header_4=5.5 header_5=5.5 header_6=5.5 header_7=5.5 header_8=5.5 header_9=5.5 I have not been following this too closely, but I don't understand the algorithm used to get the above output. #!/usr/bin/perl use warnings; use strict; use Data::Dumper; my $header; my @headerNames; my $field; my @fieldValue; my @apxScript; while (my $line = DATA) { if($line =~ m|(.*_.*\n)|){ $header = $1; @headerNames = split( ,$header); } Why not just have an else statement instead of the 'if'? if($line !~ m|.*_.*\n|){ @fieldValue = split( ,$line); print $fieldValue[0]\n; } } Not sure what you are trying to do, but each time through the loop above you are reassigning @fieldValue (I would have named it @fieldValues since arrays usually hold multiple values). Therefore, when you use @fieldValue below, it only contains data from the last line of input. my @apxScript=(@headerNames, @fieldValue); print Dumper \@headerNames; print Dumper \@fieldValue; print Dumper \@apxScript; __DATA__ csno rfpi header_1 header_2 header_3 header_4 header_5 header_6 header_7 header_8 header_9 1 1 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 2 2 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 3 3 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 4 1 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5 2 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 6 3 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 7 1 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 8 2 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 9 3 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 10 1 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 11 2 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 12 3 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 HTH, Ken -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
perlmonks.org is a good site. regards... /om On Dec 15, 2011, at 21:38, Mark Tiesman mark.ties...@doit.wisc.edu wrote: Thanks Frank. I'll add that to my list. ;-) Mark On 12/15/2011 10:07 AM, frank cui wrote: I found Perl By Example 4th Edition book pretty help, and you may want to give a look on that one. Frank On Thu, Dec 15, 2011 at 11:54 AM, Mark Tiesman mark.ties...@doit.wisc.edu mailto:mark.ties...@doit.wisc.edu wrote: Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. Thanks!! -- Mark -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org mailto:beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org mailto:beginners-h...@perl.org http://learn.perl.org/ -- Mark C. Tiesman Campus Network Services Division of Information Technology (DoIT) University of Wisconsin - Madison 1210 W Dayton St Rm B116 608.264.4357 - Help Desk 608.890.3940 - Office ties...@wisc.edu -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
2011/12/15 Mark Tiesman mark.ties...@doit.wisc.edu Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. Thanks!! -- Mark -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ Hi, If you want to learn real word perl programming, Automating System Administration with Perl by David N. Blank-Edelman is a good follow up after the Llama book.http://www.amazon.com/David-N.-Blank-Edelman/e/B001I0WHFW/ref=sr_ntt_srch_lnk_1?qid=1323965602sr=8-1http://www.amazon.com/Automating-System-Administration-Perl-Efficient/dp/059600639X/ref=sr_1_1?ie=UTF8qid=1323965602sr=8-1
Re: split function
On 2011-12-14 05:43, Chris Stinemetz wrote: I am trying to split the first element of an array by white space then continue reading the rest of the file. Thus far I am having trouble figuring out how to split the first line. You have an XY problem, you are probably looking for http://search.cpan.org/perldoc?Text::CSV_XS. -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
On Thu, Dec 15, 2011 at 9:24 PM, Mark Tiesman mark.ties...@doit.wisc.edu wrote: Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. Thanks!! here is a blog i maintain , and update it with useful links i come across now and then ... hope it help you out http://linuxwalk.blogspot.com/ -- Regards Agnello D'souza -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
*http://www.chankeypathak.com/search/label/Perl* * * On Thu, Dec 15, 2011 at 10:20 PM, Agnello George agnello.dso...@gmail.comwrote: On Thu, Dec 15, 2011 at 9:24 PM, Mark Tiesman mark.ties...@doit.wisc.edu wrote: Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. Thanks!! here is a blog i maintain , and update it with useful links i come across now and then ... hope it help you out http://linuxwalk.blogspot.com/ -- Regards Agnello D'souza -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- Regards, Chankey Pathak http://javaenthusiastic.blogspot.com
Re: Guidance for a New Programmer/Perl User
On 2011-12-15 16:54, Mark Tiesman wrote: general information on learning to program and Perl How to Perl: http://learn.perl.org/ which mentions: http://learn.perl.org/books/ -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
The Learning Perl by Randal Schwartz Video series is a nice intro: http://shop.oreilly.com/product/0636920014430.do Along with the companion book Learning Perl (6ed): http://shop.oreilly.com/product/0636920018452.do Lynda.com also offers Perl 5 Essential Training by Bill Weinman: http://www.lynda.com/Perl-5-tutorials/essential-training/61025-2.html If your company can pay for the training, O'reilly School can't hurt: http://www.oreillyschool.com/certificates/perl-programming.php Though they basically cover the O'reilly books. Juan Madrigal Web Developer Web and Emerging Technologies University of Miami Richter Library On 12/15/11 10:54 AM, Mark Tiesman mark.ties...@doit.wisc.edu wrote: Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. Thanks!! -- Mark -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
Hi Mark, On Thu, 15 Dec 2011 09:54:17 -0600 Mark Tiesman mark.ties...@doit.wisc.edu wrote: Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. Thanks!! Some other people and I have concentrated many good resources for learning Perl here: http://perl-begin.org/ Hope it proves helpful. Regards, Shlomi Fish -- - Shlomi Fish http://www.shlomifish.org/ Optimising Code for Speed - http://shlom.in/optimise Larry Wall’s pure‐Perl code is faster than Assembly. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: split function
On Thu, Dec 15, 2011 at 10:42 AM, Dr.Ruud rvtol+use...@isolution.nl wrote: On 2011-12-14 05:43, Chris Stinemetz wrote: I am trying to split the first element of an array by white space then continue reading the rest of the file. Thus far I am having trouble figuring out how to split the first line. You have an XY problem, you are probably looking for http://search.cpan.org/perldoc?Text::CSV_XS. Text::CSV_XS is not an option for me. The unix system I am developing Perl scripts on doesn't allow me to install local libraries from CPAN. Thank you, Chris -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
shlomi, Thanks for the link. I have bookmarked:-) On 12/15/2011 11:56 AM, Shlomi Fish wrote: Hi Mark, On Thu, 15 Dec 2011 09:54:17 -0600 Mark Tiesmanmark.ties...@doit.wisc.edu wrote: Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. Thanks!! Some other people and I have concentrated many good resources for learning Perl here: http://perl-begin.org/ Hope it proves helpful. Regards, Shlomi Fish -- Mark C. Tiesman Campus Network Services Division of Information Technology (DoIT) University of Wisconsin - Madison 1210 W Dayton St Rm B116 608.264.4357 - Help Desk 608.890.3940 - Office ties...@wisc.edu -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
Here are some new videos: http://szabgab.com/perl_tutorial.html The standard stuff is here: http://www.perl.org/learn.html http://learn.perl.org/first_steps/http://learn.perl.org/ And this is what I was originally looking for: http://perl-tutorial.org/ It's a curated list of tutorials. On Thu, Dec 15, 2011 at 12:58 PM, Mark Tiesman mark.ties...@doit.wisc.eduwrote: shlomi, Thanks for the link. I have bookmarked:-) On 12/15/2011 11:56 AM, Shlomi Fish wrote: Hi Mark, On Thu, 15 Dec 2011 09:54:17 -0600 Mark Tiesmanmark.tiesman@doit.**wisc.edu mark.ties...@doit.wisc.edu wrote: Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. Thanks!! Some other people and I have concentrated many good resources for learning Perl here: http://perl-begin.org/ Hope it proves helpful. Regards, Shlomi Fish -- Mark C. Tiesman Campus Network Services Division of Information Technology (DoIT) University of Wisconsin - Madison 1210 W Dayton St Rm B116 608.264.4357 - Help Desk 608.890.3940 - Office ties...@wisc.edu -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
RE: split function
-Original Message- From: Ken Slater [mailto:kl...@psu.edu] Sent: Thursday, December 15, 2011 11:09 AM To: 'Chris Stinemetz'; 'John W. Krahn' Cc: 'Perl Beginners' Subject: RE: split function -Original Message- From: Chris Stinemetz [mailto:chrisstinem...@gmail.com] Sent: Thursday, December 15, 2011 10:47 AM To: John W. Krahn Cc: Perl Beginners Subject: Re: split function I'm getting a bit closer. There a couple roadblocks I am up against. I am able to split the lines by white space, but for some reason the program isn't capturing the first lines to the @fieldValue array after the @headerNames array. Once I get all the lines to go into the array correctly I would like to combine the @headerNames and @fieldValue arrays. The way I am doing it now only appends the later. I would like the combination to be the below for each elements in the two arrays. any help is greatly appreciated, Chris csno=1 rfpi=1 header_1=5.5 header_2=5.5 header_3=5.5 header_4=5.5 header_5=5.5 header_6=5.5 header_7=5.5 header_8=5.5 header_9=5.5 I have not been following this too closely, but I don't understand the algorithm used to get the above output. #!/usr/bin/perl use warnings; use strict; use Data::Dumper; my $header; my @headerNames; my $field; my @fieldValue; my @apxScript; while (my $line = DATA) { if($line =~ m|(.*_.*\n)|){ The above line could be more easily written as If ($line =~ m/_/) { based on the fact that underscores apparently only appear in headers. $header = $1; Above line is unecessary @headerNames = split( ,$header); @headerNames = split( ,$line); } Why not just have an else statement instead of the 'if'? if($line !~ m|.*_.*\n|){ @fieldValue = split( ,$line); As mentioned below, you are not saving off any of these values. So at the end, you only have the values from the last line. You need to print here, or save off your data. To print in the format you desire, you could use a counted loop or a hash slice. For example, a hash slice could be used as follows: my %hash; @hash{@headerNames} = @fieldValue; You could then print each key and value on a line (to get them in the desired order you may have to loop over @headerNames to get the key values). print $fieldValue[0]\n; } } Not sure what you are trying to do, but each time through the loop above you are reassigning @fieldValue (I would have named it @fieldValues since arrays usually hold multiple values). Therefore, when you use @fieldValue below, it only contains data from the last line of input. my @apxScript=(@headerNames, @fieldValue); print Dumper \@headerNames; print Dumper \@fieldValue; print Dumper \@apxScript; __DATA__ csno rfpi header_1 header_2 header_3 header_4 header_5 header_6 header_7 header_8 header_9 1 1 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 2 2 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 3 3 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 4 1 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5 2 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 6 3 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 7 1 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 8 2 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 9 3 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 10 1 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 11 2 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 12 3 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 HTH, Ken -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: split function
On 15/12/2011 15:47, Chris Stinemetz wrote: I'm getting a bit closer. There a couple roadblocks I am up against. I am able to split the lines by white space, but for some reason the program isn't capturing the first lines to the @fieldValue array after the @headerNames array. Once I get all the lines to go into the array correctly I would like to combine the @headerNames and @fieldValue arrays. The way I am doing it now only appends the later. I would like the combination to be the below for each elements in the two arrays. any help is greatly appreciated, Chris csno=1 rfpi=1 header_1=5.5 header_2=5.5 header_3=5.5 header_4=5.5 header_5=5.5 header_6=5.5 header_7=5.5 header_8=5.5 header_9=5.5 #!/usr/bin/perl use warnings; use strict; use Data::Dumper; my $header; my @headerNames; my $field; my @fieldValue; my @apxScript; while (my $line =DATA) { if($line =~ m|(.*_.*\n)|){ $header = $1; @headerNames = split( ,$header); } if($line !~ m|.*_.*\n|){ @fieldValue = split( ,$line); print $fieldValue[0]\n; } } my @apxScript=(@headerNames, @fieldValue); print Dumper \@headerNames; print Dumper \@fieldValue; print Dumper \@apxScript; __DATA__ csno rfpi header_1 header_2 header_3 header_4 header_5 header_6 header_7 header_8 header_9 1 1 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 2 2 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 3 3 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 4 1 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5 2 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 6 3 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 7 1 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 8 2 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 9 3 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 10 1 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 11 2 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 12 3 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 Hey Chris Your program reads lines from DATA and splits every line that doesn't contain an underscore into @fieldValue. Every line of data overwrites the contents of the array, so the end result is that @fieldValue holds the data from the last line of data. What are you hoping for? If you want to retain the /first/ line of data instead of the last then you need only to add a 'last' statement after the '@fieldValue = split( ,$line)' on line 19. 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, $headers[$i], $data[$i]; } } else { @headers = split; } } __DATA__ csno rfpi header_1 header_2 header_3 header_4 header_5 header_6 header_7 header_8 header_9 1 1 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 2 2 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 3 3 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 4 1 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5 2 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 6 3 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 7 1 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 8 2 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 9 3 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 10 1 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 11 2 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 12 3 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 **OUTPUT** csno=1 rfpi=1 header_1=5.5 header_2=5.5 header_3=5.5 header_4=5.5 header_5=5.5 header_6=5.5 header_7=5.5 header_8=5.5 header_9=5.5 csno=2 rfpi=2 header_1=5.5 header_2=5.5 header_3=5.5 header_4=5.5 header_5=5.5 header_6=5.5 header_7=5.5 header_8=5.5 header_9=5.5 csno=3 rfpi=3 header_1=5.5 header_2=5.5 header_3=5.5 header_4=5.5 header_5=5.5 header_6=5.5 header_7=5.5 header_8=5.5 header_9=5.5 csno=4 rfpi=1 header_1=5.5 header_2=5.5 header_3=5.5 header_4=5.5 header_5=5.5 header_6=5.5 header_7=5.5 header_8=5.5 header_9=5.5 csno=5 rfpi=2 header_1=5.5 header_2=5.5 header_3=5.5 header_4=5.5 header_5=5.5 header_6=5.5 header_7=5.5 header_8=5.5 header_9=5.5 csno=6 rfpi=3 header_1=5.5 header_2=5.5 header_3=5.5 header_4=5.5 header_5=5.5 header_6=5.5 header_7=5.5 header_8=5.5 header_9=5.5 csno=7 rfpi=1 header_1=5.5 header_2=5.5 header_3=5.5 header_4=5.5 header_5=5.5 header_6=5.5 header_7=5.5 header_8=5.5 header_9=5.5 csno=8 rfpi=2 header_1=5.5 header_2=5.5 header_3=5.5 header_4=5.5 header_5=5.5 header_6=5.5 header_7=5.5 header_8=5.5 header_9=5.5 csno=9 rfpi=3 header_1=5.5 header_2=5.5 header_3=5.5 header_4=5.5 header_5=5.5 header_6=5.5 header_7=5.5 header_8=5.5 header_9=5.5 csno=10 rfpi=1 header_1=5.5 header_2=5.5 header_3=5.5 header_4=5.5 header_5=5.5 header_6=5.5 header_7=5.5 header_8=5.5 header_9=5.5 csno=11 rfpi=2 header_1=5.5 header_2=5.5 header_3=5.5 header_4=5.5 header_5=5.5 header_6=5.5 header_7=5.5 header_8=5.5 header_9=5.5 csno=12 rfpi=3 header_1=5.5 header_2=5.5 header_3=5.5 header_4=5.5 header_5=5.5 header_6=5.5 header_7=5.5 header_8=5.5 header_9=5.5 Tool completed successfully -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org
Re: split function
On 15/12/2011 16:09, Ken Slater wrote: I have not been following this too closely, but I don't understand the algorithm used to get the above output. What is that Ken? If you don't understand the question then ask some questions of your own! I would have named it @fieldValues since arrays usually hold multiple values Renaming variables will never fix a problem as long as 'use strict vars' is in effect. It is a gesture towards better code and no more. my @apxScript=(@headerNames, @fieldValue); print Dumper \@headerNames; print Dumper \@fieldValue; print Dumper \@apxScript; HTH, Ken This is the source of the OP's misunderstanding, yet you make no comment at all. Rob -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: split function
Tool completed successfully Thank you Rob! This is what I was trying to accomplish. I'm going to have to research to find out exactly what you did. Thanks agian, Chris -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
RE: split function
To: Perl Beginners Cc: Ken Slater; Chris Stinemetz Subject: Re: split function On 15/12/2011 16:09, Ken Slater wrote: I have not been following this too closely, but I don't understand the algorithm used to get the above output. What is that Ken? If you don't understand the question then ask some questions of your own! I figured out what he wanted and posted regarding this in my second response. I was just confused at first because all his values appeared to be 5.5. I would have named it @fieldValues since arrays usually hold multiple values Renaming variables will never fix a problem as long as 'use strict vars' is in effect. It is a gesture towards better code and no more. True. I did not say it would fix his problem. my @apxScript=(@headerNames, @fieldValue); print Dumper \@headerNames; print Dumper \@fieldValue; print Dumper \@apxScript; HTH, Ken This is the source of the OP's misunderstanding, yet you make no comment at all. Rob The source of his problem was that he was not saving or printing the @fieldValue array (again I would have preferred @fieldValues :-) ) inside the loop. Which I pointed out. Ken -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
Mark, i think with an eye on future, you should start by reading Rakudo etc. i.e. perl6 From: Mark Tiesman mark.ties...@doit.wisc.edu To: beginners@perl.org Sent: Thursday, December 15, 2011 9:54 AM Subject: Guidance for a New Programmer/Perl User Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. Thanks!! -- Mark -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: split function
Hi Chris, On Thu, 15 Dec 2011 11:58:00 -0600 Chris Stinemetz chrisstinem...@gmail.com wrote: On Thu, Dec 15, 2011 at 10:42 AM, Dr.Ruud rvtol+use...@isolution.nl wrote: On 2011-12-14 05:43, Chris Stinemetz wrote: I am trying to split the first element of an array by white space then continue reading the rest of the file. Thus far I am having trouble figuring out how to split the first line. You have an XY problem, you are probably looking for http://search.cpan.org/perldoc?Text::CSV_XS. Text::CSV_XS is not an option for me. The unix system I am developing Perl scripts on doesn't allow me to install local libraries from CPAN. 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 modules from CPAN under your home directory. Regards, Shlomi Fish -- - Shlomi Fish http://www.shlomifish.org/ First stop for Perl beginners - http://perl-begin.org/ Knuth is not God! It took him two days to build the Roman Empire. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
How quickly Perl 6 knowledge can be put to good use probably depends on where you work. I don't think there are many businesses where they are looking to convert their Perl 5 code to Perl 6 in the immediate future. Rajeev Prasad rp.ne...@yahoo.com wrote: Mark, i think with an eye on future, you should start by reading Rakudo etc. i.e. perl6 From: Mark Tiesman mark.ties...@doit.wisc.edu To: beginners@perl.org Sent: Thursday, December 15, 2011 9:54 AM Subject: Guidance for a New Programmer/Perl User Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. Thanks!! -- Mark -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
Hi Rajeev, On Thu, 15 Dec 2011 15:20:24 -0500 Brendan bdgil...@gmail.com wrote: How quickly Perl 6 knowledge can be put to good use probably depends on where you work. I don't think there are many businesses where they are looking to convert their Perl 5 code to Perl 6 in the immediate future. Rajeev may wish to read http://perl-begin.org/learn/perl6/ about the relationship between Perl 5/perl 5 and Perl 6. Neither Perl 5 nor perl 5 are going away, and Perl 6 is a completely different language. Furthermore, the current Perl 6 implementations are incomplete (= don't implement the entire Perl 6 spec), and may not perform very well or have various bugs. I wouldn't want to discourage you from learning Perl 6, because it's an interesting language with many nifty features, but learning Perl 5 now will still prove useful for a very long term. Regards, Shlomi Fish Rajeev Prasad rp.ne...@yahoo.com wrote: Mark, i think with an eye on future, you should start by reading Rakudo etc. i.e. perl6 -- - Shlomi Fish http://www.shlomifish.org/ Stop Using MSIE - http://www.shlomifish.org/no-ie/ There is no IGLU Cabal! Home‐made Cabals eventually superseded the power and influence of the original IGLU Cabal, which was considered a cutting edge development at its time. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: split function
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 modules from CPAN under your home directory. 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 perlbrew to upgrade my Perl version due to the fact I can't figure out to get wget to work correctly without having DNS nameserver lookup capabilities. Any suggestions? Thank you, Chris -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
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. perl5 is dead end (coz perl 6 is not like 5), perl6 which is in making for so long is still not ready. for a new person, this could mean less confidence in perl and more interest towards php etc... ty. Rajeev From: Shlomi Fish shlo...@shlomifish.org To: Brendan bdgil...@gmail.com Cc: Rajeev Prasad rp.ne...@yahoo.com; Mark Tiesman mark.ties...@doit.wisc.edu; beginners@perl.org beginners@perl.org Sent: Thursday, December 15, 2011 2:45 PM Subject: Re: Guidance for a New Programmer/Perl User Hi Rajeev, On Thu, 15 Dec 2011 15:20:24 -0500 Brendan bdgil...@gmail.com wrote: How quickly Perl 6 knowledge can be put to good use probably depends on where you work. I don't think there are many businesses where they are looking to convert their Perl 5 code to Perl 6 in the immediate future. Rajeev may wish to read http://perl-begin.org/learn/perl6/ about the relationship between Perl 5/perl 5 and Perl 6. Neither Perl 5 nor perl 5 are going away, and Perl 6 is a completely different language. Furthermore, the current Perl 6 implementations are incomplete (= don't implement the entire Perl 6 spec), and may not perform very well or have various bugs. I wouldn't want to discourage you from learning Perl 6, because it's an interesting language with many nifty features, but learning Perl 5 now will still prove useful for a very long term. Regards, Shlomi Fish Rajeev Prasad rp.ne...@yahoo.com wrote: Mark, i think with an eye on future, you should start by reading Rakudo etc. i.e. perl6 -- - Shlomi Fish http://www.shlomifish.org/ Stop Using MSIE - http://www.shlomifish.org/no-ie/ There is no IGLU Cabal! Home‐made Cabals eventually superseded the power and influence of the original IGLU Cabal, which was considered a cutting edge development at its time. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
for a new person, this could mean less confidence in perl and more interest towards php etc... ty. Rajeev Hi Rajeev, The idea is not to curry favour with one language or another, but help a person get on with what they're doing. If Mark needs to know Perl for his job, then I think we can safely assume it's Perl 5 that is being discussed. I don't think Shlomi meant to imply (or implied) P5 is a dead end—indeed, it's not—but that learning Perl 6, or some implementation (which may or may not end up being finished/abandoned/?), will not help Mark with his job. more interest towards php is not a valid concern because a) we're not trying to stop 'our people' going to 'their people', we're trying to help people get things done, and b) Mark didn't come to Perl, Perl came to Mark, so it's not like there's any worry that he'll choose something else. ;-) Best of luck to you all, Anneli From: Shlomi Fish shlo...@shlomifish.org To: Brendan bdgil...@gmail.com Cc: Rajeev Prasad rp.ne...@yahoo.com; Mark Tiesman mark.ties...@doit.wisc.edu; beginners@perl.org beginners@perl.org Sent: Thursday, December 15, 2011 2:45 PM Subject: Re: Guidance for a New Programmer/Perl User Hi Rajeev, On Thu, 15 Dec 2011 15:20:24 -0500 Brendan bdgil...@gmail.com wrote: How quickly Perl 6 knowledge can be put to good use probably depends on where you work. I don't think there are many businesses where they are looking to convert their Perl 5 code to Perl 6 in the immediate future. Rajeev may wish to read http://perl-begin.org/learn/perl6/ about the relationship between Perl 5/perl 5 and Perl 6. Neither Perl 5 nor perl 5 are going away, and Perl 6 is a completely different language. Furthermore, the current Perl 6 implementations are incomplete (= don't implement the entire Perl 6 spec), and may not perform very well or have various bugs. I wouldn't want to discourage you from learning Perl 6, because it's an interesting language with many nifty features, but learning Perl 5 now will still prove useful for a very long term. Regards, Shlomi Fish Rajeev Prasad rp.ne...@yahoo.com wrote: Mark, i think with an eye on future, you should start by reading Rakudo etc. i.e. perl6 -- - Shlomi Fish http://www.shlomifish.org/ Stop Using MSIE - http://www.shlomifish.org/no-ie/ There is no IGLU Cabal! Home‐made Cabals eventually superseded the power and influence of the original IGLU Cabal, which was considered a cutting edge development at its time. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
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 there is no doubt of the benefits in Perl, but what place does it have? And what are its competitors? As CGI, Perl falls behind PHP by having to 'print' the entire HTML page. So what is its place? Rob On 15/12/2011 21:53, Rajeev Prasad 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. perl5 is dead end (coz perl 6 is not like 5), perl6 which is in making for so long is still not ready. for a new person, this could mean less confidence in perl and more interest towards php etc... ty. Rajeev From: Shlomi Fishshlo...@shlomifish.org How quickly Perl 6 knowledge can be put to good use probably depends on where you work. I don't think there are many businesses where they are looking to convert their Perl 5 code to Perl 6 in the immediate future. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
Have you looked at these MVC perl frameworks and alternatives to CGI? They definitely go beyond a simple print. mojolicious http://mojolicio.us/ dancer http://perldancer.org/ Catalyst http://www.catalystframework.org/ Web.pm https://github.com/masak/web psgi http://plackperl.org/ mod_parrot/mod_perl6 http://parrot.org/mod_parrot -Juan Sent from my iPad On Dec 15, 2011, at 5:33 PM, 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 there is no doubt of the benefits in Perl, but what place does it have? And what are its competitors? As CGI, Perl falls behind PHP by having to 'print' the entire HTML page. So what is its place? Rob On 15/12/2011 21:53, Rajeev Prasad 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. perl5 is dead end (coz perl 6 is not like 5), perl6 which is in making for so long is still not ready. for a new person, this could mean less confidence in perl and more interest towards php etc... ty. Rajeev From: Shlomi Fishshlo...@shlomifish.org How quickly Perl 6 knowledge can be put to good use probably depends on where you work. I don't think there are many businesses where they are looking to convert their Perl 5 code to Perl 6 in the immediate future. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
On 12/15/2011 07:54 AM, Mark Tiesman wrote: Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. http://www.mail-archive.com/beginners@perl.org/msg100200.html HTH, David -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: module for development
2011/12/15 Shlomi Fish shlo...@shlomifish.org: See: http://search.cpan.org/dist/Devel-TraceUse/ Great module, the result it prints is good. Thanks Shlomi. Ken. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/