Re: map HoAoA

2010-10-19 Thread brian d foy
In article , Brandon McCaig wrote: > On Tue, Oct 19, 2010 at 2:31 AM, brian d foy wrote: > > Actually, we call it the "range operator" in Learning Perl. It just > > happens to be in a more general section named "List Literals". Both > > "range ope

Re: map HoAoA

2010-10-18 Thread brian d foy
In article <20101018005850.ga2...@playground.mcclains.net>, Mike McClain wrote: > This threw me for a loop for a while since there is no comma in > map { @{ $HoAoA{$_} } [ 0..$#{ $HoAoA{$_} } ]->[1] } keys %HoAoA; > but I figured out that the range operator '..' returns a list and > eventua

Re: perl real life exercise

2010-10-16 Thread brian d foy
ing-Perl-Student-Workbook-brian/dp/0596009968 -- brian d foy -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Is unlink() supposed to provide an error message on failure?

2009-11-19 Thread brian d foy
In article <1893d21769b943eea293dcc1e9429...@p43400e>, David Christensen wrote: > Is unlink() supposed to provide an error message on failure? The > documentation does not say so: I've fixed this in commit 40ea6f68 to perl blead. The entry now reads: =item unlink LIST X X X X X =item unlink

Re: suggestion for FAQ

2009-11-04 Thread brian d foy
In article <874opczzn6@quad.sysarch.com>, Uri Guttman wrote: > subscribe using one and to post using the other would work. also this > list doesn't have anything directly to do with the FAQ editing. you need > to send it to brian d foy who is the FAQ editor. No, no, no

Re: Learning Perl Student Workbook

2009-11-04 Thread brian d foy
In article , raphael() wrote: > I just finished reading 'Learning Perl' & I was wondering if someone > could point me to the book "Perl Study Guide", > also called "Learning Perl Student Workbook". It's a companion book to > "Learning Perl" but is not available in my country. > > I was hopin

Re: pie multiline replace

2008-06-07 Thread brian d foy
[[ This message was both posted and mailed: see the "To," "Cc," and "Newsgroups" headers for details. ]] In article <[EMAIL PROTECTED]>, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: > I think you are right. I'd suggest that you send a

Re: How to measure the efficiency, load & performance of a script?

2008-05-21 Thread brian d foy
[[ This message was both posted and mailed: see the "To," "Cc," and "Newsgroups" headers for details. ]] In article <[EMAIL PROTECTED]>, timbo <[EMAIL PROTECTED]> wrote: > Hi all, > > I was just wondering if any general tools / modules exist to help > measure the efficiency of any code. > I k

Re: questions from Learning Perl

2008-04-13 Thread brian d foy
In article <[EMAIL PROTECTED]>, Chas. Owens <[EMAIL PROTECTED]> wrote: > On Sun, Apr 6, 2008 at 5:36 AM, <[EMAIL PROTECTED]> wrote: > snip > > my $user_total = &total(); > snip > > First off, don't call functions with &*. The is _Learning Perl_, and he hasn't got to the point where we tell t

Re: questions from Learning Perl

2008-04-13 Thread brian d foy
In article <[EMAIL PROTECTED]>, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: > I don't understand what you mean. However, the code below confuses me > for another reason. > > > use strict; > > use warnings; > > my @fred = qw/1 3 5 7 9/; > > my $fred_total = &total(@fred); > > print "The total o

Re: while reading 'mastering perl' @+ and @-, not too clear on this

2008-03-23 Thread brian d foy
In article <[EMAIL PROTECTED]>, Richard Lee <[EMAIL PROTECTED]> wrote: > While reading 'mastering perl', I run into @- and @+ for the first time. > Trying to understand what's going on, I ran the code from the book, but > > $-[1] and $+[1] shoudln't match only the first match? (in this case, > sh

Re: building Perl 5.8.8

2007-08-26 Thread brian d foy
In article <[EMAIL PROTECTED]>, Robert Hicks <[EMAIL PROTECTED]> wrote: > When it asks about threads should I enable them or no? In Perl's Configure, if you don't understand the question, accept the default answer. :) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Re: subroutine references

2007-08-26 Thread brian d foy
In article <[EMAIL PROTECTED]>, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: > Chris wrote: > > I'm working on yet another exercise from Intermediate Perl. I've been > > given a script that searches for files that fall between a two > > timestamps. > Why do people who write these books have e

Re: simple profiling?

2006-04-03 Thread brian d foy
In article <[EMAIL PROTECTED]>, Bryan Harris <[EMAIL PROTECTED]> wrote: > I have a script that takes ~5 seconds to run, but I'd like to get it down to > <1 sec. My problem is I don't know which part is the slow part. So given > something like this: You don't have to modify your code to profile

Re: error in perl.com

2001-11-25 Thread brian d foy
n actually fix anything. -- brian d foy <[EMAIL PROTECTED]> - Perl services for hire CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: New Libs vs Old Perl

2001-11-21 Thread brian d foy
v5.6.1) doesn't match executable version (v5.6.0) at > /d/data/global/COWEB/pub/cgi-bin/RM/lib/perl/sol/5.6.1/sun4-solaris/Config.p > m line 21. recompile or reinstall the libraries for each version. -- brian d foy <[EMAIL PROTECTED]> - Perl services for hire CGI Meta FAQ

Re: Sending HTTP Headers

2001-10-24 Thread brian d foy
erl http://search.cpan.org/doc/GAAS/libwww-perl-5.53_97/lwpcook.pod -- brian d foy <[EMAIL PROTECTED]> - Perl services for hire CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html -- To unsubscribe, e-mail: [EM

Re: write and format

2001-09-25 Thread brian d foy
format seems to > produce a \n after execution. I want to be able to control when a > newline is started. Any ideas? use one format, or use printf. -- brian d foy <[EMAIL PROTECTED]> - Perl services for hire CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html Troubleshooting CGI sc

Re: Underline

2001-09-13 Thread brian d foy
to use some sort of typesetting or markup language. -- brian d foy <[EMAIL PROTECTED]> - Perl services for hire CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html -- To unsubscribe, e-mail: [EMAIL PROTECTED] For a

Re: Search --> Replace on Unix

2001-09-06 Thread brian d foy
? perl -pi.old -e "s|../forum_idx.pl|../cgi-bin/forum_idx.pl|g" * see the perlrun manpage for details on all of the switches. http://www.perldoc.com/perl5.6/pod/perlrun.html -- brian d foy <[EMAIL PROTECTED]> - Perl services for hire CGI Meta FAQ - http://www.perl.or

Re: Unable to open a File

2001-09-06 Thread brian d foy
e"); make sure you check to see what the error is by inspecting the error variable $! ... die "Could not open file.\n$!"; -- brian d foy <[EMAIL PROTECTED]> - Perl services for hire CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html Troubleshooting CGI scripts - http:/

Re: Problem with inheritance

2001-09-06 Thread brian d foy
start with h2xs :) http://www.perldoc.com/perl5.6/bin/h2xs5.003.html add a line to declare your variables: use vars qw( @ISA ); -- brian d foy <[EMAIL PROTECTED]> - Perl services for hire CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html Troubleshooting CGI scripts - http://www

Re: selecting a file from web bowser

2001-09-05 Thread brian d foy
HP? are you looking for file uploads? -- brian d foy <[EMAIL PROTECTED]> - Perl services for hire CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additiona

Re: Capture an email address from a text file

2001-09-05 Thread brian d foy
e is also a nifty module on CPAN which tries its best to do this: http://search.cpan.org/doc/MIYAGAWA/Email-Find-0.07/lib/Email/Find.pm -- brian d foy <[EMAIL PROTECTED]> - Perl services for hire CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html Troubleshooting CGI scripts - http://www.perl.org/troubl

Re: Memory usage of var...

2001-09-05 Thread brian d foy
re the server has a heart attack and dies > on me. if this mail lives in a file, then you can simply check the file size, perhaps with the file test operator -s. my $size = -s $file; see the section of the perlfunc manpage that talk about these: http://www.perldoc.com/perl5.6/pod/func

Re: strict pragma and @ISA

2001-09-05 Thread brian d foy
al::Package::@ISA that is @Local::Package::ISA > throughout. The other way is to pre-delare the global variables in the package, > with > > use vars qw(@ISA); you can also use our() as the latest version on h2xs will do for you. :) -- brian d foy <[EMAIL PROTECTED]>

Re: securing sensitive information in CGI scripts

2001-09-05 Thread brian d foy
n job that does it). Big hole > there. hoepfully the webserver is configured not to serve up those files. :) > At the very least, files included in a script that contain > sensitive information should be kept away from the document root of your > webserver. absolutely. -- b

Re: Multi dimension arrays

2001-09-05 Thread brian d foy
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Gordon Barr) wrote: > Is there a way of handling these in perl? see the perldsc (data structures cookbook) man page. :) http://www.perldoc.com/perl5.6/pod/perldsc.html -- brian d foy <[EMAIL PROTECTED]> - Perl services fo

Re: Using different versions of a module

2001-09-05 Thread brian d foy
to pick up the new module first? -- brian d foy <[EMAIL PROTECTED]> - Perl services for hire CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional com

Re: cron, perl and iTunes

2001-09-05 Thread brian d foy
there is no need to edit the crontab. simply put this perl script in the contab, and kill the iTunes process with Perl's kill(). -- brian d foy <[EMAIL PROTECTED]> - Perl services for hire CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html Troubleshooting CGI scripts - http://www.perl

Re: why doesn't this work

2001-09-05 Thread brian d foy
rically.\n" if $a == $b; print "They match asciibetically.\n" if $a eq $b; -- brian d foy <[EMAIL PROTECTED]> - Perl services for hire CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Form Results

2001-09-05 Thread brian d foy
e process is persistent (as you know, Randal ;). i much prefer some sort of hash of the user data or a unique login name. this has the added advantage of using semi-descriptive filenames. :) -- brian d foy <[EMAIL PROTECTED]> - Perl services for hire CGI Meta FAQ - http://www.perl.org/C