Re: hello from a newbie

2013-10-26 Thread David Christensen
On 10/26/13 03:36, Mayuresh Kathe wrote: hi, this is my first mail to this list, and the first time i'll be working with perl. Welcome! :-) i've been searching for books on learning and mastering perl and found the series by o'reilly to be quite well recommended. would i be right in my

OT: Python

2013-10-26 Thread David Christensen
On 10/26/13 04:28, htchd...@live.com wrote: How about python? Many people consider it's better than Perl and it becomes more and more popular. There are a lot of really smart people who like Python. There are a lot of useful Python programs, and a lot of useful programs that incorporate

Re: hello from a newbie

2013-10-26 Thread David Christensen
On 10/26/13 04:31, Mayuresh Kathe wrote: I have watched Python programmers pull their hair out trying to bring the performace upto acceptable limits and resource usage under control. As soon as their programs increase in complexity, the problems with Python start becoming evident. IMNSHO I've

meta on OT posts

2013-10-26 Thread David Christensen
On 10/26/13 14:08, John SJ Anderson wrote: Python advocacy is very much off-topic. On 10/26/13 14:24, htchd...@live.com wrote: What's the big deal to compare these 2 languages? On 10/26/13 14:35, Shawn H Corey wrote: Because some of the early advocates for Python trash-talked Perl. And

Re: OT: Python

2013-10-26 Thread David Christensen
On 10/26/13 16:25, Ed Davis wrote: I would think the question being asked isn't 'OT' which is namely: what's runtime v compile time ... (and Python's .pyc's are sort of in the middle). Id think a beginners list first task would be to help you make the choice? There are a number of

Re: OT: Python

2013-10-26 Thread David Christensen
On 10/26/13 16:42, htchd...@live.com wrote: 1, I don't know what's OT ? The mail server offers the following description for this list: http://lists.perl.org/list/beginners.html A list for beginning Perl programmers to ask questions in a friendly atmosphere. So, if you're a

climbing the Perl learning curve

2013-10-26 Thread David Christensen
someone wrote: Thanks a lot ! I can see you are really exceptional among these Perl monks:) Thank you for the complement, but I still have a lot to learn in a number of areas. It's a multifaceted game, and we're all at different stages. The people on the Perl Beginners list help me, so I

Higher Order Perl support

2013-10-22 Thread David Christensen
beginners: I'm re-reading Higher Order Perl [1] and writing/ rewriting code as I go. The author's web site is up: http://hop.perl.plover.com/ But the hop-discuss mailing list archives are broken, subscription requests are bouncing, and e-mail messages to the author are bouncing.

Re: Quizzing students with Perl

2013-10-03 Thread David Christensen
On 10/03/13 07:59, Rick T wrote: The code below (server addresses Xed out for security) has been used on my website for years, but it does seem to misbehave on rare occasions, so I have a few questions on how I might improve it. snip The problem is that you have a program, but what you

Re: hash function and combining function/operator

2013-09-25 Thread David Christensen
On 09/25/13 18:53, Jing Yu wrote: Another look at it, and I think I've pointed you to a wrong way. BLAST might not what you need. Sorry about this. No problem. The more I look at it, the less I believe there is such a pair of functions. David -- To unsubscribe, e-mail:

Re: hash function and combining function/operator

2013-09-24 Thread David Christensen
On 09/24/13 00:12, Dr.Ruud wrote: I assume this is about paths and filenames. Have you considered an rsync dry-run? I use rsync -n ... frequently. I also assume that you want to communicate as little as possible, so you don't have supersets of all strings on all sides. (or it would become a

hash function and combining function/operator

2013-09-23 Thread David Christensen
beginners: I'm looking for a hash function and a related function or operator such that: H(string1 . string2) = f(H(string1), H(string2)) H(string1 . string2) = H(string1) op H(string2) where: H() is the hash function string1 is a string string2

Re: hash function and combining function/operator

2013-09-23 Thread David Christensen
On 09/23/13 15:29, Rob Dixon wrote: My immediate thought is that the only hash function that can work like this is the identity function (or any one-one mapping) because, by extension, the hash of a string must be equal to f(the hash of each of its characters). Not that I can prove this at

Re: hash function and combining function/operator

2013-09-23 Thread David Christensen
On 09/23/13 15:34, someone wrote: Er hash function as in crypto hashing? a does: H(string1 . string2) = f(H(string1), H(string2)) H(string1 . string2) = H(string1) op H(string2) mean that I'm looking for a hash function and a related function or operator such that: f(H(string1),

Re: hash function and combining function/operator

2013-09-23 Thread David Christensen
On 09/23/13 18:17, Jing Yu wrote: I don't know the answer but... it sounds like NCBI's BLAST to me, which compares nucleotide or protein sequences. NCBI's FTP site provides local BLAST binaries, and bioperl offers some convenient tools to implement it. That looks like server-side software,

Re: negate, !!$a, $a!!, flip-flop

2013-09-11 Thread David Christensen
On 09/10/13 20:01, John W. Krahn wrote: xor-equals IS assignment and has the same precedence as assignment: Thanks! David -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: negate, !!$a, $a!!, flip-flop

2013-09-10 Thread David Christensen
On 09/10/13 14:59, David Christensen wrote: Assuming canonical boolean values, post-invert semantics (save the new value into another variable) ... Pre-invert semantics (save the old value into another variable) ... Oops -- it looks like I got my pre- and post- backwards... And, dropping

Re: negate, !!$a, $a!!, flip-flop

2013-09-10 Thread David Christensen
September 10, 2013 06:15 Hans Ginzel wrote: Is there a shorter way to write $a = ! $a, please? Something analogous to ++ and -- operators like $a !! or !! $a would negate the variable $a and return its previous or new value respectively. I don't believe Perl has boolean pre-invert or

Re: negate, !!$a, $a!!, flip-flop

2013-09-10 Thread David Christensen
beginners: Here's a second try at using bitwise xor-equals to implement boolean pre- and post-invert operations for variables containing canonical boolean values (undef, empty string, zero, and one). The pre-invert semantics case (invert, then use) uses the bitwise xor-equals operator and

Re: Hello

2013-07-14 Thread David Christensen
On 07/12/13 21:50, David Christensen wrote: I was half asleep when I wrote that -- it looks like three people answered two different questions: 1. Shawn and James -- what is the IP address of the DNS server used by the host? 2. David -- what is the Internet address of the NAT firewall

beginners@perl.org and netiquette

2013-07-14 Thread David Christensen
Someone wrote: Can you please make the subject line read like a Perl topic rather than a personal message in future? http://lists.perl.org/list/beginners.html states: A list for beginning Perl programmers to ask questions in a friendly atmosphere. People posting on

Re: Hello

2013-07-14 Thread David Christensen
On 07/12/13 21:55, Chengqiao Wang wrote: unsubscribe. please cancel the subscribe. I am not a list moderator and do not have the ability to unsubscribe you. To unsubscribe from the beginners@perl.org mailing list, please send an e-mail to: beginners-unsubscr...@perl.org HTH, David

Re: Hello

2013-07-12 Thread David Christensen
On 07/11/13 23:31, Frank Vino wrote: Could you please let me know the perl script how to find DNS IP address of system.? Testing Shawn Wilson's code: 2013-07-12 21:13:45 dpchrist@desktop ~/sandbox/perl $ cat ip-address.pl #!/usr/bin/perl use strict; use warnings; my $file = /etc/resolv.conf;

Re: Creating a Perl web site, how should I build this

2013-07-04 Thread David Christensen
On 07/03/13 10:13, Robert Freiberger wrote: I'm working on a work project where we are moving a few Perl scripts from a command line to a web page that will allow more users to access the tool. Basically it's a very simple script that takes an updated CSV feed, runs a internal test, then reports

Fwd: Re: Perl Cookbook

2013-06-17 Thread David Christensen
Someone wrote: I have the 2nd edition. Make sure you reply to list so that everyone can help and/or benefit. Okay. What about the other two suggestions? 2. Have you checked the errata on the publisher's web site? Here are the errata for the current (2nd) edition:

Fwd: Re: OT pedagogy and the beginners@perl.org mailing list

2013-06-16 Thread David Christensen
I wrote: Rheotorical question -- which program would you rather write? 1. 1,000 lines of assembly. 2. 100 lines of C. 3. 10 lines of Java. 4. 1 line of Perl. Someone wrote: If this is your best point... I believe this is one of Perl's best points. :-) As I understand it, Perl is not a

Fwd: Perl Cookbook

2013-06-16 Thread David Christensen
Someone wrote: I bought a book Perlcookbook, and seams to be that the book has some mistakes, 1. Which edition do you have -- 1st or 2nd? 2. Have you checked the errata on the publisher's web site? Here are the errata for the current (2nd) edition:

Fwd: TEsco::Kesho and malware

2013-06-16 Thread David Christensen
Someone wrote: my TEsco::Kesho, doesn't run because of chinese invaded my laptop. Please fix your laptop, or get it fixed. (Please understand that the beginners@perl.org is not the best resource for fixing your laptop. I'd suggest finding a mailing list or forum specific to your laptop's

OT pedagogy and the beginners@perl.org mailing list

2013-06-14 Thread David Christensen
On 06/13/13 22:55, Shlomi Fish wrote: That's nice and dandy, but please don't publish the products of your one-liners turned into scripts here without cleaning them up first, because there are beginners on this mailing list who need to learn good practices from the code and posts here, and code

Re: sha-2 sum of files?

2013-06-13 Thread David Christensen
On 06/13/13 01:41, Shlomi Fish wrote: 1. You're lacking strict and warnings: 2. You're looping using $_ : 3. You're using md5_hex by slurping the contents of the file into memory, 4. read_file was not explictly imported from File::Slurp: Both the Perl Cookbook and Programming Perl are showing

Re: sha-2 sum of files?

2013-06-12 Thread David Christensen
On 06/12/13 02:28, lee wrote: Yes, I've been looking at descriptions like that and I don't know perl well enough to understand them. ... This is why I was looking for an example so I can see how these things are being used. Does this make sense? 2013-06-12 15:51:48 dpchrist@desktop

Re: sha-2 sum of files?

2013-06-11 Thread David Christensen
On 06/11/13 21:44, lee wrote: ... what I don't understand is what the most efficient way would be to create a sha-2 sum for a file. Have you considered Digest? http://perldoc.perl.org/Digest.html HTH, David -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional

Re: Lines written to a file are not contiguous

2013-05-09 Thread David Christensen
Shlomi Fish wrote: Furthermore, many non-UNIX-like systems don't contain a cat command. I wrote: Thank God for electronics recycling. ;-) On 05/08/13 23:50, Shlomi Fish wrote: What do you mean? I meant that systems that are non-UNIX-like (or cannot be made Unix-like with Linux, *BSD,

Re: Lines written to a file are not contiguous

2013-05-09 Thread David Christensen
On 05/09/13 07:56, Sherman Willden wrote: Thank you, David. I thought about doing cat but I thought it would have to be a system call. YW. TIMTOWTDI -- system calls or otherwise. More importantly, there is more than one style of Perl programming. I find Perl especially useful for quick

Re: Lines written to a file are not contiguous

2013-05-08 Thread David Christensen
I wrote: $| = 1; # [1] $OUTPUT_AUTOFLUSH On 05/08/13 02:24, Shlomi Fish wrote: http://perl-begin.org/tutorials/bad-elements/#properly_autoflushing Which recommends: use IO::Handle; STDOUT-autoflush(1); 1. For larger, longer-lived, shared, portable,

Re: Lines written to a file are not contiguous

2013-05-07 Thread David Christensen
On 05/07/13 11:00, Sherman Willden wrote: ... I downloaded the Oreilly Programming Perl Version 4 examples. There are 30 directories with 2211 files. I want each chapter to have a consolidated file with all the examples for that chapter. I created the consolidate_examples.pl script which goes

Re: Perl Application Deployment

2013-04-27 Thread David Christensen
On 04/26/13 23:36, Mike Dunaway wrote: Can anyone point me in the right direction to read about proper application deployment? I want a user to be able to download the application and build it on the command line using a makefile I suppose and I want dependencies to be installed automatically as

Re: Local static HTML tree of Perl POD similar to perldoc.perl.com?

2013-04-04 Thread David Christensen
On 04/02/13 22:08, Brian Fraser wrote: 1. Is there a canonical system path ... 2. Is there a corresponding canonical environment variable ... No to all of these. OK If you want Perl's documentation, the distribution comes with a installhtml script ... For Debian 6 Squeeze i386,

Local static HTML tree of Perl POD similar to perldoc.perl.com?

2013-04-02 Thread David Christensen
beginners: I would like to create static HTML trees of Perl documentation, similar to perldoc.perl.com: 1. Is there a canonical system path (directory) for such? Is there a canonical per-user path for such? For development? 2. Is there a corresponding canonical environment variable for

Re: parsing website

2013-02-26 Thread David Christensen
On 02/26/13 10:46, Noah wrote: I want to parse text from a website. what are some good methods and modules to do this? Any tutorial links? Perl LWP is the canonical book on the subject: http://shop.oreilly.com/product/9780596001780.do HTH, David -- To unsubscribe, e-mail:

Re: Need a Perl Book for Beginner

2012-12-04 Thread David Christensen
On 12/04/12 14:56, Asad wrote: Would you guidance to start develop logic for perl programming . Also I am looking for a book to start with . Which explains the basic of perl programming with examples also how to develop logic for programing. IMHO the canonical trilogy

Re: cgi development environment

2012-09-18 Thread David Christensen
On 09/18/12 05:34, Chris Stinemetz wrote: I am very interested in cgi scripting. I have only used php for web development in the past. Would someone please let me know of any good tutorials to get windows based web development environment set up and get my feet wet?

How do I arrange for Makefile.PL to create a modulino instance script?

2012-08-29 Thread David Christensen
beginners: I am working on a modulino [1] and would like to use ExtUtils::MakeMaker to generate a Makefile such that make (or make all) copies the module file (lib/MyModulino.pm) to a script file (perl-bin/mymodulino.pl) and sets the execute bit. Any suggestions? TIA, David

Re: Forking question

2012-08-10 Thread David Christensen
On 08/10/12 02:10, G M wrote: I'm working on a forking process and I need a way to check if any of the processes have failed and if they have restart them. Can anyone point me in the right direction to a tutorial or explanation of how to do this? Network Programming with Perl by Lincoln D.

Re: how to set session variable (not session cookie) using perl CGI

2012-08-07 Thread David Christensen
On 08/07/12 14:40, Rajeev Prasad wrote: I am using CGI.pm on my website, but I generate my pages using TT (template Toolkit). I have few questions: 0. how to have a session variable (not a session cookie)? If I do not want to use cookie, do i have to store session data in a temp file on server

Re: Perl script logging permissions

2012-05-26 Thread David Christensen
On 05/26/2012 12:33 PM, Kwaku Addo Ofori wrote: I need some help. I've just finished my script and a manual test is fine. Basically, it's a script that gets the PID of some selected process and lists all the open file descriptors for the processes pipes this to a file. Problem is, when I run the

Re: shift vs @_

2012-05-21 Thread David Christensen
On 05/21/2012 12:40 PM, sono-io wrote: David, Are you saying that it would be faster to do: my $this_date = shift; my $output = shift; as opposed to: my ($this_date, $output) = @_; or am I not reading your assessment correctly? 1. Benchmarking on the target

Re: shift vs @_

2012-05-21 Thread David Christensen
On 05/21/2012 08:37 PM, Steve Bertrand wrote: On 2012-05-21 21:10, David Christensen wrote: Therefore, performance is first and clarity is second. Would you not agree that these are pretty extreme cases to be making such a wide-reaching decision on? Please trim your replies. No, I don't

Re: shift vs @_

2012-05-20 Thread David Christensen
On 05/20/2012 08:09 AM, sono-io wrote: Are there any differences between these two idioms if only one or zero arguments are passed to them? my ($mode) = @_; my $mode = shift; If your subroutine needs to know how many arguments were passed, the former style (assignment) makes this

Re: shift vs @_

2012-05-20 Thread David Christensen
On 05/20/2012 03:28 PM, Shawn H Corey wrote: On 12-05-20 06:15 PM, David Christensen wrote: If your subroutine needs to know how many arguments were passed, the former style (assignment) makes this trivial. Once @_ has been shifted (latter style), I don't know an easy way to determine if zero

Re: CGI setuid programs

2012-05-11 Thread David Christensen
On 05/11/2012 01:25 PM, Tessio Fechine wrote: Everywhere I read about cgi setuid programs says that it is wrong and must never be done, but nobody says how to circumvent the need of it. In my case, I need to read a password from a protected file (read only, owned by root) to connect to a

Re: get information from server

2012-04-22 Thread David Christensen
On 04/22/2012 09:29 AM, lina wrote: How do I use ssh p3600 'top' It shows me TERM environment variable not set. Please read the manual page for top: $ man top Try the batch mode operation and number of iterations options: $ ssh p3600 top -b -n 1 HTH, David -- To unsubscribe,

Re: get information from server

2012-04-21 Thread David Christensen
On 04/21/2012 07:51 AM, lina wrote: Thanks, I didn't realize that the ssh p3600 'do something' can do something without being in the server. Yes -- providing a command to ssh is a very useful. Check out the manual page for more information: $ man ssh Taking it one step further,

Re: get information from server

2012-04-20 Thread David Christensen
On 04/20/2012 05:42 AM, lina wrote: I used to ssh Mars (servers's name) and then cd to some directory and check some file's modification time. Can I do it locally with perl, without ssh? A local Perl script will need some way to read the mtime of the file on the remote host. If you get to

Re: Book Recommendation - XPath, XML,SQL, XQuery

2012-04-18 Thread David Christensen
On 04/17/2012 11:04 PM, flebber wrote: Thanks David. YW. :-) I need to create an XML feed from Website data and store it in a MSSQL database. Then create queries stored procedures on that data and present the data in a web format. I will also be using MySQL but as part of my main project.

Re: perl2exe

2012-04-18 Thread David Christensen
On 04/18/2012 07:49 PM, Somu wrote: Is there a way to convert perl code into executables? Cava Packager is one option: http://www.cava.co.uk/ I've played with it on Linux, and it worked. HTH, David -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands,

Re: Book Recommendation - XPath, XML,SQL, XQuery

2012-04-17 Thread David Christensen
On 04/17/2012 08:28 PM, flebber wrote: Can anyone recommend a good book/s for Perl and learning how to handle XPath,XML,SQL, XQuery. I would like to know better how to handle and retrieve text formats and utilise database storage of the data. Sorry I should have pointed out in ref to above I

Re: Transitioning from BASH to Perl

2012-03-16 Thread David Christensen
On 03/16/2012 02:13 PM, Deepak Malhotra wrote: You might have got similar questions in past too but could I request to demystify it again on how to swiftly and quickly make transition to Perl from Bash. Although I am no expert of Bash and awk but I can do the stuff which suffice my needs. What I

Re: What name(space) is suitable for My::Module?

2012-03-09 Thread David Christensen
On 03/09/2012 06:53 AM, Narazaka Nanigashi wrote: I'm going to release a Perl module for the first time but cannot determine the name of the module. ... My module is for input and output of config / BBS log files whose records are separated by some delimiters. Please see:

Re: Of Date-Manip and Perl versions

2012-03-09 Thread David Christensen
On 03/08/2012 11:53 AM, Bruce Ferrell wrote: Just thought I'd share with the group and experience I just had. In perhaps the hope of sparing others of the PITA I just went through. ... use Common; # contains timestamp() use Date::Manip; ... Shouldn't this have thrown SOME kind of

Re: Undefined subroutine main::subs

2012-03-07 Thread David Christensen
On 03/07/2012 08:41 AM, lina wrote: $ ./substr_accessing_examples.pl Undefined subroutinemain::subst called at ./substr_accessing_examples.pl line 15. On 03/07/2012 09:02 AM, Brock wrote: I think you mean 'substr' instead of 'subst'. Typographic errors are maddening; I make them all the

Re: Undefined subroutine main::subs

2012-03-07 Thread David Christensen
On 03/07/2012 08:49 PM, lina wrote: Thanks David, YW. :-) I started from the second book, perl cookbook. 2nd edition. I only read till 15 pages, progressed so slow, and sometimes choked by understanding the pack. really hard for me to understand it, so I just skip. meanwhile I also did

Re: Learning perl

2012-03-05 Thread David Christensen
On 03/05/2012 07:19 AM, lina wrote: Which books are the best perl books you have ever read? 1. Learning Perl -- this book gets you up the initial learning curve. Read it cover to cover, enter and play with the example code, and do the exercises:

Scalar::Util::blessed() considers Regexp references to be blessed?

2012-01-22 Thread David Christensen
beginners@perl.org: While coding some tests tonight, I discovered that Scalar::Util::blessed() considers Regexp references to be blessed. Is this a bug or a feature? TIA, David 2012-01-22 21:07:57 dpchrist@p43400e ~/sandbox/perl $ cat blessed #! /usr/bin/perl # $Id: blessed,v 1.1

Re: Inserting a new data structure in a bless reference

2012-01-15 Thread David Christensen
On 01/13/2012 07:25 PM, Parag Kalra wrote: my $obj = FooBar-new; $obj-{'new_key'} = 'some_value' Now I am not sure if that is the correct way of inserting a new data structure into an already bless reference 1. FooBar may or may not be implemented as a hashref. 2. It's not wise to muck with

Re: Regex : Extract data between { } spanning in multplie lines

2011-12-24 Thread David Christensen
On 12/23/2011 01:56 AM, iand wrote: Ex file.txt: A1 {@ a d e \n a b c} A2 {@ 1 {2 3} \n a b c \n d e f} I need to extract these separately : {@ a d e a b c } {@ 1 {2 3} \n a b c \n d e f} http://shop.oreilly.com/product/9780596528126.do HTH, David -- To unsubscribe, e-mail:

Re: parsing data

2011-12-20 Thread David Christensen
On 12/20/2011 05:16 PM, Chris Stinemetz wrote: I am having some trouble coming up with a solution for what I am trying to accomplish. Any advice is greatly appreciated. ... *** input *** csno=1 rfpi=1 vrp0=3423000 vrp1=3423000 trl=170 line= low= high=5 csno=1 rfpi=2 vrp0=3423000

slicing array references

2011-12-18 Thread David Christensen
beginners@perl.org: I'm working on some classes with attributes that are array and hash references, and am confused by what happens when I attempt to slice an array or hash reference. For example: 7. $ra-[0, 1, 2] evaluates to $ra-[2]. 8. $ra-[0 .. 2] produces two Use of uninitialized

Re: slicing array references

2011-12-18 Thread David Christensen
On 12/18/2011 06:05 PM, John W. Krahn wrote: $ra is a scalar that holds a reference to an array. $ra-[0] dereferences an array element. To dereference an array slice use: @{ $ra }[ 0, 1, 2 ] ... @{ $ra }[ 0 .. 2 ] On 12/18/2011 06:14 PM, Shawn H Corey wrote: my @slice = @$ra[ 1, 2, 3 ]; ...

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: Guidance for a New Programmer/Perl User

2011-12-15 Thread David Christensen
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

Re: multi-column array

2011-11-30 Thread David Christensen
On 11/30/2011 03:06 PM, Jeswin wrote: I've been trying to figure out how to print 2 arrays into 2 columns. I came across this code and it works but gives me a problem in the output. sub transpose { map { my $i = $_; [ map $_-[ $i ], @_ ] } 0 .. $#{ $_[0] } } print @$_\n for transpose \(

Re: running a shel script within a perl cgi script

2011-11-09 Thread David Christensen
On 11/09/2011 04:57 AM, Agnello George wrote: I am trying to run a shell script within a perl cgi script , however it is not getting executed . cat /vae/www/cg-bin/syscscript.pl my $openvpn = `ps aux |grep openvpn |grep -v grep`; unless ( $openvpn) { system( /usr/sbin/openvpn

Re: what's the error?

2011-11-06 Thread David Christensen
On 11/05/2011 10:49 AM, Uri Guttman wrote: ... you can build a fire and keep a man warm for a night or put him on fire and keep him warm for a lifetime! :) Twisted. You must have played DD. }:- David -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands,

Re: what's the error?

2011-11-05 Thread David Christensen
On 11/05/2011 02:00 AM, Uri Guttman wrote: there was no actual error anywhere in his code. Good. :-) that was a very long post that missed the actual issue. ... he just printed $! which happens to have some value in it (and all $! values are some error text/number!). Agreed. I was

Re: what's the error?

2011-11-04 Thread David Christensen
On 11/04/2011 07:48 PM, Ken Peng wrote: perl -le 'open HD,/etc/passwd or die $!; HD; print $!' Here's your one-liner as a script with some printf instrumentation: $ nl HD.pl 1 #!/usr/bin/perl 2 use strict; 3 use warnings; 4 open HD,/etc/passwd or die $!; 5 print

Re: HELP on Perl array / sorting - trying to convert Korn Shell Script to Perl

2011-10-21 Thread David Christensen
On 10/21/2011 07:18 PM, newbie01 perl wrote: Am trying to write/convert a customized df script... I've attached a version of the script in Korn shell. ... ... [input] Filesystemkbytesused avail capacity Mounted on /dev/md/dsk/d1 3099287 2482045 55525782%/

Re: In search of a list class with unusual accessors

2011-10-20 Thread David Christensen
On 10/19/2011 07:04 PM, David Christensen wrote: I am looking for a class that stores zero or more items (e.g. a list) and that provides accessors that accept and return scalar, list, and/or array references depending upon context and object content (similar to CGI.pm, but not exactly

Re: In search of a list class with unusual accessors

2011-10-20 Thread David Christensen
On 10/20/2011 06:28 PM, Rob Dixon wrote: I think you should be wary of returning a simple scalar only when there is just a single item in the list. You will end up having to check to see if the return value is a reference before you know how to handle it. I didn't design the calling interface

In search of a list class with unusual accessors

2011-10-19 Thread David Christensen
beginners: I am looking for a class that stores zero or more items (e.g. a list) and that provides accessors that accept and return scalar, list, and/or array references depending upon context and object content (similar to CGI.pm, but not exactly the same): use

Re: In search of a list class with unusual accessors

2011-10-19 Thread David Christensen
On 10/19/2011 07:08 PM, John SJ Anderson wrote: Perhaps Set::Object will meet your needs? https://metacpan.org/module/Set::Object Thank you for the reply. :-) Unfortunately, no. I'm looking to store ordered lists, not sets, and I am looking for methods that variously accept and return

Re: In search of a list class with unusual accessors

2011-10-19 Thread David Christensen
On 10/19/2011 07:38 PM, Alan Haggai Alavi wrote: The `wantarray` function can be made use of. It helps in determining the context. Thank you for the reply. :-) Yes. sub set { my ( $self, @values ) = @_; @$self = @values; return; } Your set() method doesn't appear to deal

Re: turnign a script into a perl module

2011-09-15 Thread David Christensen
On 09/15/2011 11:58 AM, Rajeev Prasad wrote: ... turn the inner script into a module of subroutines. ... how would i turn this into a module which can be called from another script? ... I'd suggest buying and reading Intermediate Perl: http://shop.oreilly.com/product/9780596102067.do

Re: Creating letter combination generator

2011-07-11 Thread David Christensen
On 07/10/2011 03:19 PM, Chris Nehren wrote: Does the sixth edition still encourage bad practices like calling subs with, not using three-arg open with lexical filehandles, and the like? I read Learning Perl 2 e. and it was worth every penny. So, I'm offering a blind recommendation based on

Re: Creating letter combination generator

2011-07-09 Thread David Christensen
On 07/08/2011 06:26 PM, Robert wrote: I have currently wrote a simple script to attempt to create a list of every letter combination this is a rough outline of what I want my program to do . . . For climbing the Perl learning curve, I recommend the following three books (in order): 1.

Re: Remote User Enviorment

2011-06-17 Thread David Christensen
On 06/17/2011 02:55 PM, Mike Blezien wrote: Is there away to generate a remote_user enviorment without having to use the apache popup login form? What we are thinking of doing is create a static login form, they enter their username/password, then directing them to a password protected folder

Modern Perl p. 33 continue -- what is a with loop?

2011-06-07 Thread David Christensen
beginners: I'm reading Modern Perl. I'm not sure where to get help with the technical content of the book. STFW I've found: http://onyxneon.com/books/modern_perl/index.html http://www.modernperlbooks.com/mt/index.html https://github.com/chromatic/modern_perl_book/wiki

Re: Galbraith, P., 2009, Developing Web Applications with Apache, MySQL, memcached, and Perl

2011-06-06 Thread David Christensen
beginners: [Thread moved from mod_perl list - David] On 06/04/2011 05:09 PM, David Christensen wrote: I have an idea for a WWW CMS framework and am looking for a current book on production-grade Perl WWW development. I'm more interested in learning how things work from the ground up

Re: text between tag manipulation (HTML)

2011-04-30 Thread David Christensen
On 04/30/2011 02:01 PM, David wrote: I'm trying to insert on-screen sequential numbers (in locally saved web documents) to let non-web designers comment on the elements/tags. Additionally, these numbers act as a pseudo-line/reference number. Just to be clear, if I have: body pLorem ipsum

Re: Nature of this list

2011-04-24 Thread David Christensen
On 04/24/2011 02:36 AM, Shlomi Fish wrote: I also think it is a better idea to put someone who is acting in an abusive manner on manual moderation before actually banning them. Good idea. Does the beginners@perl.org mailing list software have this feature? Well, online bullying is a

Re: Creating web pages using Perl.

2011-04-23 Thread David Christensen
On 04/23/2011 01:14 AM, Sean Murphy wrote: The perl script must generate plain 4.0 HTML code. I am not after any bells or whistles on the page. The Perl script will go through all my Audio books and group them by author, title and titles in series. I was thinking a table with the below

Re: Nature of this list

2011-04-23 Thread David Christensen
On 04/19/2011 06:26 PM, David Christensen wrote: So, my next question is has the complaint resolution process broken down?. It's been 4 days, and I haven't seen a reply to the above question. Right now, per the Beginning Perl mailing list FAQ (FAQ) [1], this list is controlled by moderators

Re: Embedding Perl in HTML

2011-04-22 Thread David Christensen
On 04/22/2011 10:11 AM, sono...@fannullone.us wrote: I realize that this list may not be the best, or even most appropriate, place to ask this question, but I'm just so curious that I'm losing sleep over it! =;) What is the best way to embed perl in an HTML file that is _not_ located under

Re: Embedding Perl in HTML

2011-04-22 Thread David Christensen
On 04/22/2011 05:33 PM, sono...@fannullone.us wrote: I've been working with an older Perl shopping cart script and the placeholders it uses are only accessible on pages that are placed under the cgi-bin directory, Is there documentation for this script on the WWW? If so, what is the URL?

Re: Embedding Perl in HTML

2011-04-22 Thread David Christensen
On 04/22/2011 11:22 AM, sono...@fannullone.us wrote: On Apr 22, 2011, at 10:21 AM, Agnello George wrote: my $tt = Template-new( INCLUDE_PATH = /var/template ) || die template process failed:$!; $tt-process(form.tmpl,\%tag) || die $tt-error(); It appears that I'd have to explicitly

Re: Nature of this list

2011-04-19 Thread David Christensen
On 04/19/2011 08:00 AM, Peter Scott wrote: I remember when Casey West and Kevin Meltzer started this list. Casey was very specific on-line and in person about it being a place where newcomers could ask questions without being flamed. The FAQ bears this out: ... this one at least had a good

Re: Regular Expressions Question

2011-04-10 Thread David Christensen
On 04/10/2011 04:05 AM, cityuk wrote: Is there a way to say here is a whole RE, here is another and match the first or the second? Jeffrey E.F. Friedl, 2006, Mastering Regular Expressions, 3 e., O'Reilly Media, ISBN 978-0-596-52812-6. http://oreilly.com/catalog/9780596528126/ HTH, David

Debian, Apache, Perl, CGI.pm, ErrorDocument, and POST

2011-04-02 Thread David Christensen
beginners-cgi: I have a Debian 6.0, Apache 2.2.16, Perl 5.10.1, and CGI.pm 3.43 machine with a folder containing: $ cat .htaccess Options +ExecCGI AddHandler cgi-script pl ErrorDocument 404 /cgi.pm-get-post-errordocument/printcgi.pl $ cat index.html html body ul lidirect:

Re: when javascript is disabled in browser

2011-03-14 Thread David Christensen
On 03/14/2011 06:25 AM, Rahul!! wrote: I am new to cgi-perl web development. When javascript is disabled in the browser, how to validate it from the CGI file?? I want to do something like this, if (/javascript is disabled){ print br This webapp needs javascript, please enableable

Re: Creating PDF/FDF files

2011-03-01 Thread David Christensen
On 03/01/2011 07:58 AM, Mike Blezien wrote: I'm working on a small project that will require us to parse data submitted from an Adobe Reader form, i.e questionaires. Then we'll need to generate either a PDF or FDF temp file, attach it to an email, and send it to use. Now parsing the data from

  1   2   >