New Website for Perl Beginners: perlmeme.org
Hi good people, there's a new web-site for Perl beginners - perlmeme.org - http://perlmeme.org/ It has Howto's, Tutorials and FAQs for Perl beginners - freely available and freely usable. Its mission ( http://perlmeme.org/start_here/index.html ) is: It's lots of ideas that together define why Perl is so different. It is the idea that there should be more that one way to do it, the idea that a language should make easy jobs easy and hard jobs possible, the idea that laziness, patience and hubris are virtues (for a programer). Perl itself is evolving at a rate unlike any other programming language. Those of us who use it for a living are excited by how powerful and expressive the language is and how close to the 'problem set' it is. With the development of Perl 6 well underway, the language is set to expand and take on even more functionality not found anywhere else. In our opinion, this makes it the language of choice for solving many of the software problems of the future. I have already contributed some code, text and ideas to perlmeme.org, but we could always use more help. If you have a document to contribute (even if it's already written), can provide feedback on the site, or can help in any other way, feel free to visit our developers' web-site: http://perlmeme-org.sourceforge.net/ Regards, Shlomi Fish - Shlomi Fish [EMAIL PROTECTED] Homepage:http://www.shlomifish.org/ 95% of the programmers consider 95% of the code they did not write, in the bottom 5%. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: New Website for Perl Beginners: perlmeme.org
Shlomi == Shlomi Fish [EMAIL PROTECTED] writes: Shlomi Hi good people, Shlomi there's a new web-site for Perl beginners - perlmeme.org - Shlomi http://perlmeme.org/ Unless it's hidden, I'm not finding any obvious link there to the defacto standard location for Perl beginners, http://learn.perl.org. I think this represents broken integrity on your part, since you appear to be trying to replace learn.perl.org, not supplement it, so you're attempting to fracture the community, not enhance it. If you add a prominent link to learn.perl.org, I will withdraw my complaint. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 merlyn@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: New Website for Perl Beginners: perlmeme.org
Randal L. Schwartz said the following on 02/10/05 13:17: Shlomi == Shlomi Fish [EMAIL PROTECTED] writes: Shlomi Hi good people, Shlomi there's a new web-site for Perl beginners - perlmeme.org - Shlomi http://perlmeme.org/ Unless it's hidden, I'm not finding any obvious link there to the defacto standard location for Perl beginners, http://learn.perl.org. I think this represents broken integrity on your part, since you appear to be trying to replace learn.perl.org, not supplement it, so you're attempting to fracture the community, not enhance it. If you add a prominent link to learn.perl.org, I will withdraw my complaint. I agree with this, and mentioned my thoughts here: http://perlmonks.org/?node_id=496511 Thanks, Gavin. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: New Website for Perl Beginners: perlmeme.org
On Oct 2, 2005, at 7:17 AM, Randal L. Schwartz wrote: Shlomi Hi good people, Shlomi there's a new web-site for Perl beginners - perlmeme.org - Shlomi http://perlmeme.org/ Unless it's hidden, I'm not finding any obvious link there to the defacto standard location for Perl beginners, http://learn.perl.org. I think this represents broken integrity on your part, since you appear to be trying to replace learn.perl.org, not supplement it, so you're attempting to fracture the community, not enhance it. If you add a prominent link to learn.perl.org, I will withdraw my complaint. I didn't look real hard, but I did not find many links to either perl.com or perl.org from the site mentioned. I did find this page, http://www.perlmeme.org/faqs/references/; with a few links and, oddly enough, I did find a link on the home page of http://learn.perl.org; to http://perlmeme.org/;. Still, I agree with Randal, it seems obvious that links should be added to resources that will provide additional info on the subjects covered, and it would be difficult to do better than starting with http://learn.perl.org;. With that in mind I took a look at a Perl site I help run and found that much the same could be said for it, so I added the link there too. I do like the meme site though, and I believe it has the potential to become a valuable resource. Kindest Regards, -- Bill Stephenson -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: New Website for Perl Beginners: perlmeme.org
--- Shlomi Fish [EMAIL PROTECTED] wrote: http://perlmeme.org/ In http://perlmeme.org/start_here/our_motivations.html there's a lot of talk about dealing with anti-Perl memes and, essentially, how to market Perl. Given that, I can only wonder why the site creators didn't bother to contact The Perl Foundation (http://www.perlfoundation.org/) as the latter is always interested in new volunteers with energy and creative ability who are willing to help out on that very topic. And is there any mention of the Perl community? I can't see it there. The site purports to be a resource for selling Perl and overcoming the negative reaction many folks have to the language, but the site is little more than a cookbook. How can one market Perl and leave out one of its strongest selling points? Oh, and this is bad, just bad: http://www.perlmeme.org/howtos/subroutines/perl_files.html And can you find the runtime errors on this page's code? http://www.perlmeme.org/howtos/using_perl/display_text_message.html And plenty of little bugs and typos here: http://www.perlmeme.org/tutorials/cgi_script.html There's more and nitpicking seems petty but for a site which has the stated goal of addressing the many irrational anti-Perl memes, it really needs to get things right. Cheers, Ovid -- If this message is a response to a question on a mailing list, please send follow up questions to the list. Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: How to enumerate modules loaded?
Siegfried Heintze wrote: How can I enumerate the file names of all the perl modules that are loaded in the current perl program? $ perl -le'print for keys %INC' $ perl -MB -le'print for keys %INC' XSLoader.pm Exporter.pm strict.pm B.pm $ perl -MBenchmark -le'print for keys %INC' warnings/register.pm Carp.pm Exporter/Heavy.pm vars.pm Time/HiRes.pm Exporter.pm strict.pm Benchmark.pm warnings.pm AutoLoader.pm Config.pm DynaLoader.pm John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Need help with XML traversing....
Hi Anyone could tell some site where I could get the script in JAVA SCRIPT for traversing the XML with unlimited DEPTH(TREE). I do not want to use the XML:: Modules available in PERL. Say I want to print the name of the tree. I did with Hard Coding. That is not I wantI tried in recursive. Failed. This works fine with Module. I don't want Module. tree name=a id=1 tree name=an id=1.1 / tree name=ani id=1.2 tree name=anis id=1.2.1/ tree name=anish id=1.2.2 tree name=anish id=1.2.2.1/ tree name=anish id=1.2.2.2 tree name=anish k id=1.2.2.2.1/ tree name=anish ku id=1.2.2.2.2/ tree name=anish kum id=1.2.2.2.3/ /tree /tree tree name=anish kuma id=1.2.3/ /tree tree name=anish kumar id=1.3/ tree name=SUCCESS id=1.4/ /tree OUTPUT a an ani anis anish anish anish k anish ku anish kum anish kuma anish kumar SUCCESS Thanks Anish
New Website for Perl Beginners: perlmeme.org
Hi good people, there's a new web-site for Perl beginners - perlmeme.org - http://perlmeme.org/ It has Howto's, Tutorials and FAQs for Perl beginners - freely available and freely usable. Its mission ( http://perlmeme.org/start_here/index.html ) is: It's lots of ideas that together define why Perl is so different. It is the idea that there should be more that one way to do it, the idea that a language should make easy jobs easy and hard jobs possible, the idea that laziness, patience and hubris are virtues (for a programer). Perl itself is evolving at a rate unlike any other programming language. Those of us who use it for a living are excited by how powerful and expressive the language is and how close to the 'problem set' it is. With the development of Perl 6 well underway, the language is set to expand and take on even more functionality not found anywhere else. In our opinion, this makes it the language of choice for solving many of the software problems of the future. I have already contributed some code, text and ideas to perlmeme.org, but we could always use more help. If you have a document to contribute (even if it's already written), can provide feedback on the site, or can help in any other way, feel free to visit our developers' web-site: http://perlmeme-org.sourceforge.net/ Regards, Shlomi Fish - Shlomi Fish [EMAIL PROTECTED] Homepage:http://www.shlomifish.org/ 95% of the programmers consider 95% of the code they did not write, in the bottom 5%. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: use strict, aliases, local
On Oct 2, Gerard Robin said: use warnings; # use strict; $foo = 26; @foo = (here's, a, list); testsub (*foo); print (The value of \$foo is now $foo\n); sub testsub { local (*printarray) = @_; foreach $element ( @printarray) { print ($element\n); } $printarray = 61; } it gives the expected result. Yes, but it's pretty esoteric code. Why are you doing this? I can't make this script work with use strict, always perl complains ? If you REALLY want to use package variables instead of lexicals, then you need to follow the instructions in the 'strict' documentation for declaring your global variables: use strict; our ($foo, @foo); $foo = ...; @foo = ...; testsub(*foo); sub testsub { our ($x, @x); *x = $_[0]; $x++; push @x, 100; } But this is really inadvisable. What is your motivation to do this kind of thing? -- Jeff japhy Pinyan% How can we ever be the sold short or RPI Acacia Brother #734% the cheated, we who for every service http://www.perlmonks.org/ % have long ago been overpaid? http://princeton.pm.org/ %-- Meister Eckhart -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Urgent help in h2xs
Hi All I appreciate your help I have MSVC++ version 6.0 Can you be more precise in telling how to use VC++ for h2xs as i dont have much prior working experience in VC++ except for some basic C++ coding. Are there any steps required for executing h2xs on MSVC++ editor. I have made a default dll project which has a default exported method. After compiling that project what should be the next steps for interfacing the the exported function from the project using perl h2xs. Please be as clear as possible so that i am able to execute the steps. Its really urgent as i have already some precious time in searching information in this area. Thanks, Sam. I From: Xiaofang Zhou [EMAIL PROTECTED] To: sam joseph [EMAIL PROTECTED], beginners@perl.org beginners@perl.org Subject: Re: Urgent help in h2xs Date: Sun, 2 Oct 2005 11:58:20 +0800 Hi, Sam, Check what version of VC u're running: active perl 5.001- vc++5.0 active perl 5.6-vc++6.0 active perl 5.8-vc.net? Thanks, Xiaofang. ÔÚ 2005-10-01 18:22:00 ÄúдµÀ£º hi I am new to perl and have got a project of interfacing c/c++ code with perl and have downloaded active perl. But i am stuck at the very basic step of execution. To interface i have to perform foll step: run h2xs run perl makefile.pl nmake after this i get an error message saying types.h not present in sys folder and many other header files missing Can anyone tell me how can i fix this problem and get teh correct C:\Perl\lib\CORE\sys\ which contains all the required header files. Any help will be appreciated. Thanks, Sam _ Repay your personal loan on your own terms. http://www.hsbc.co.in/script/in/common/redirect.asp?redirectto=/in/personal/loans/perloan.htm With HSBC's MyTerms Credit -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response . Ö Àñ£¡ Xiaofang Zhou [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response _ Amitabh fan? Heres a chance to chat with the Big B himself. http://server1.msn.co.in/sp05/DJbk/index.asp Click here now! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: generating a wordlist from an array of arrays
mark berger [EMAIL PROTECTED] writes: hey list. i stuck with gererating a wordlist from a changing multidimensional array. each entry in the array contains a list with the possible values. fe: @wordlayout = ((a, b),# possible values for 1st char (c), # possible values for 2nd char (d, e, f));# possible values for 3rd char the following wordlist should be generated: acd ace acf bcd bce bcf the only thing i came up with so far, is to generate some for loops based on the array structure (how many chars, with how many posible values) on fly and pass this to eval. pretty ugly (at least the way i thought it out). I gave that some thought. And I think it actually might be a good solution. I wonder which method is more efficient, dynamic code-generation or recursion? Here is my try at it, does it look like yours? @wordlayout = (['a', 'b'], ['c'], ['d','e','f'], ); for my $idx ( 0 .. $#wordlayout ) { # A loop for each level. $code .= 'for my $char ( @{$wordlayout[' . $idx . ']} ) {'. \n; # concat chars $code .= '$str .= $char;'.\n; } # At the innermost level, extract a word. $code .= 'push @list,$str;'; for my $idx ( 0 .. $#wordlayout ) { # Remove this levels char on our way out. $code .= 'substr($str,-1,1,);'; $code .= }\n; } # Now do it. eval $code; # The result is in @list. print join(\n,@list),\n; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: New Website for Perl Beginners: perlmeme.org
Randal L. Schwartz said the following on 02/10/05 13:17: Shlomi == Shlomi Fish [EMAIL PROTECTED] writes: Shlomi Hi good people, Shlomi there's a new web-site for Perl beginners - perlmeme.org - Shlomi http://perlmeme.org/ Unless it's hidden, I'm not finding any obvious link there to the defacto standard location for Perl beginners, http://learn.perl.org. I think this represents broken integrity on your part, since you appear to be trying to replace learn.perl.org, not supplement it, so you're attempting to fracture the community, not enhance it. If you add a prominent link to learn.perl.org, I will withdraw my complaint. I agree with this, and mentioned my thoughts here: http://perlmonks.org/?node_id=496511 Thanks, Gavin. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
BEGIN block question
Hello list, I have some trouble understanding why a BEGIN block behaves the way it does. Here are two files to demonstrate: == test = #!/usr/bin/perl use warnings; use strict; use test2 qw($var); our $var2 = 'second'; BEGIN { print I see $var but don't see $var2\n; } = test2.pm === package test2; use warnings; use strict; use Exporter; our @ISA = qw (Exporter); our @EXPORT_OK = qw ($var); our $var = 'first'; 1; What makes the difference? Thanks Peter -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: use strict, aliases, local
On Sun, Oct 02, 2005 at 08:49:30AM -0400 Jeff 'japhy' Pinyan wrote: ... If you REALLY want to use package variables instead of lexicals, then you need to follow the instructions in the 'strict' documentation for declaring your global variables: use strict; our ($foo, @foo); $foo = ...; @foo = ...; testsub(*foo); sub testsub { our ($x, @x); *x = $_[0]; $x++; push @x, 100; } But this is really inadvisable. What is your motivation to do this kind of thing? Many thanks it works fine now (with print @x, \n; :-)) but local disappeared. I pick up this example in a tutorial (it is old but it exists and there are many examples and most of them are understandable (imho)) because I searched some example of scripts which used local. I encounter some problems to figure out local ;-) for example, in perldoc -q dynamic, I found this example: (I changed it a little...) use warnings; # use strict; $var = 'global'; print in visible ; visible(); dynamic(); lexical(); sub visible { print \$var has value $var\n ; } sub dynamic { local $var = 'local'; print in dynamic ; visible(); } sub lexical { my $var = 'private'; print in lexical via visible ; visible(); print in lexicale \$var has value $var\n; } output: in visible $var has value global in dynamic $var has a value local in dynamic via visible $var has value local in lexical via visible $var has value global in lexicale $var has value private if I want the result: in visible $var has value global in dynamic $var has a value local in dynamic via visible $var has value local in lexical via visible $var has value local in lexicale $var has value private I think that I have two ways: With local: .. use strict; use vars '$var'; local $var; . without local: .. use strict; our $var = global; . Is it correct what I said ? tia -- Gérard -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: BEGIN block question
Just to sum it up, so I make sure I got what you are saying. From the previous e-mail I understand that: * Right after the use xxx statement is parsed the corresponding module which is 'use'd is fully parsed AND executed. This execution includes any top level code not enclosed in subroutines and all subroutines referenced by said code, just like if we were to do 'perl file.pm' * Parsing of the original 'use'r code (even if there are BEGIN blocks defined firther in the 'use'r) continues only after the abovementioned parsing/execution is completed for the 'use'ed module and recursively any other modules it in turn might be 'use'ing. Is this correct? :) Thanks a lot Peter -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: BEGIN block question
Peter Rabbitson wrote: Just to sum it up, so I make sure I got what you are saying. From the previous e-mail I understand that: To sum what up? What who is saying? What previous e-mail? John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
RE: BEGIN block question
Peter Rabbitson mailto:[EMAIL PROTECTED] wrote: : I have some trouble understanding why a BEGIN block behaves the : way it does. Here are two files to demonstrate: : [snip code] : What makes the difference? 'use' and 'BEGIN' blocks are compiled by Perl before our(). So your script is compiled by the Perl interpreter in this order. : #!/usr/bin/perl : use warnings; : use strict; : use test2 qw($var); : : BEGIN { : print I see $var but don't see $var2\n; : } : : our $var2 = 'second'; HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
FW: Re: Urgent help in h2xs
I have installed activeperl version 5.8.7 for win32 applications on windows 2000. I am using MSVC for compiling the programs and after running h2xs.bat when i run the makefile.pl command it gives me the following error message : Could not open 'lib/03_10_05.pm': No such file or directory at C:/Perl/lib/ExtUt ils/MM_Unix.pm line 3079. and the line 3079 of MM_Unix.pm looks like this : open(FH,$parsefile) or die Could not open '$parsefile': $!; Anyone knowing why such kind of an error message is coming ??? From: sam joseph [EMAIL PROTECTED] To: [EMAIL PROTECTED], beginners@perl.org, [EMAIL PROTECTED] Subject: Re: Urgent help in h2xs Date: Sun, 02 Oct 2005 20:28:07 +0530 Hi All I appreciate your help I have MSVC++ version 6.0 Can you be more precise in telling how to use VC++ for h2xs as i dont have much prior working experience in VC++ except for some basic C++ coding. Are there any steps required for executing h2xs on MSVC++ editor. I have made a default dll project which has a default exported method. After compiling that project what should be the next steps for interfacing the the exported function from the project using perl h2xs. Please be as clear as possible so that i am able to execute the steps. Its really urgent as i have already some precious time in searching information in this area. Thanks, Sam. I From: Xiaofang Zhou [EMAIL PROTECTED] To: sam joseph [EMAIL PROTECTED], beginners@perl.org beginners@perl.org Subject: Re: Urgent help in h2xs Date: Sun, 2 Oct 2005 11:58:20 +0800 Hi, Sam, Check what version of VC u're running: active perl 5.001- vc++5.0 active perl 5.6-vc++6.0 active perl 5.8-vc.net? Thanks, Xiaofang. ÔÚ 2005-10-01 18:22:00 ÄúдµÀ£º hi I am new to perl and have got a project of interfacing c/c++ code with perl and have downloaded active perl. But i am stuck at the very basic step of execution. To interface i have to perform foll step: run h2xs run perl makefile.pl nmake after this i get an error message saying types.h not present in sys folder and many other header files missing Can anyone tell me how can i fix this problem and get teh correct C:\Perl\lib\CORE\sys\ which contains all the required header files. Any help will be appreciated. Thanks, Sam _ Repay your personal loan on your own terms. http://www.hsbc.co.in/script/in/common/redirect.asp?redirectto=/in/personal/loans/perloan.htm With HSBC's MyTerms Credit -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response . Ö Àñ£¡ Xiaofang Zhou [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response _ Amitabh fan? Heres a chance to chat with the Big B himself. http://server1.msn.co.in/sp05/DJbk/index.asp Click here now! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response _ Stand a chance to Win Half Kg Gold Lots more! http://adfarm.mediaplex.com/ad/ck/4686-26272-10936-631?ck=GoldRush Shop on eBay Now! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response