Re: Scalar References - oxymoron?

2017-04-04 Thread Peter Scott
nt something light and immutable. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=9780133036268 -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: grep - block with start & end text

2016-03-19 Thread Scott Hall
Thanks Andrew. Your article explained what I did not have the words for. It was very well written. Scott On Fri, Mar 18, 2016 at 1:23 PM Andrew Solomon <and...@geekuni.com> wrote: > And to understand Scott's easy to write, hard to understand approach: > > http://blog.geekuni.c

Re: grep - block with start & end text

2016-03-18 Thread Scott Hall
irst line is having - retr_test asm1 > & 4th line is having only - END > > so I want to grep all four lines with above match . > > If you are looking for a command line that works like grep: perl -lne 'print if /retr_test asm1/ .. /END/;' input_file http://perldoc.perl.org

Re: Forking as another user

2016-03-13 Thread Peter Scott
r while loop, only one client can connect at a time. > > What modification can prevent zombies yet allow multiple concurrent > clients to attach? You need the WNOHANG option on your wait() to make it nonblocking. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ ht

Re: Operand evaluation order

2014-03-17 Thread Peter Scott
. This leads me to believe that operand evaluation is either non-deterministic and compiler-dependent, or it's simply broken. Kudos for the curiosity. Did you have any other reason for wanting to know how this worked in Perl? -- Peter Scott http://www.perlmedic.com/ http

Re: question about perl 6 sigils

2013-09-29 Thread Peter Scott
determined that they could remove this small speed bump without any damage to the language. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.oreillyschool.com/certificates/perl-programming.php http://www.informit.com/store/product.aspx?isbn=9780133036268

Re: Who instantiated an object

2013-05-31 Thread Peter Scott
a bad practice now. See http://search.cpan.org/~petdance/Perl-Critic-Bangs-1.08/lib/Perl/Critic/ Policy/Bangs/ProhibitRefProtoOrProto.pm and near the end of http:// www.stonehenge.com/merlyn/UnixReview/col52.html. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http

Re: hash issue

2013-04-19 Thread Peter Scott
in the internals to make it safe: https:// groups.google.com/forum/?hl=enfromgroups=#!topic/comp.lang.perl.moderated/ _J9aO8pdAVc -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/certificates

Re: Proposed correction for my long script

2012-09-16 Thread Peter Scott
$MAX_PERMISSIBLE_RUN_TIME; $SIG{ALRM} = sub { die Exceeded $MAX_PERMISSIBLE_RUN_TIME timeout }; -- 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

Re: My script is OUT OF CONTROL!

2012-09-13 Thread Peter Scott
of HTML back that'll be tedious to validate. This is the point at which you learn about separation of responsibilities and the Model-View-Controller pattern if you want to improve how you do this in the future.) -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http

Re: Using different libraries dynamically

2012-09-12 Thread Peter Scott
::Env eq 'dev' ? '/path/to/dev' : '/path/to/prod' ); } -- 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

Re: parsing multiple logins logs (create a unique hash name for every user)

2012-09-10 Thread Peter Scott
} } ) { print \t$inner_key: $hash{$outer_key}{$inner_key}\n; } } -- 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

Re: Perl Code

2012-08-31 Thread Peter Scott
Strictly correct answer that shows instructor didn't think about the question Do let us know what grade that gets you :-) -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/certificates

Re: Perl Code

2012-08-31 Thread Peter Scott
On Sat, 01 Sep 2012 04:05:31 +, Peter Scott wrote: On 2012-08-29, at 12:46 PM, Ashwin Rao T ashwin...@gmail.com wrote: 1)Check if IP address is in the range 172.125.1.0 and 172.125.25.0 using only return functions regular expressions in Perl. /\b172\.125\.(\d+)\.((?\d+))(??{(1=$1 $1

Re: Attach iCal event to an cgi mail

2012-06-11 Thread Peter Scott
. Is there any means to look inside? How to redirect the content of SENDMAIL in the debugger? Am Donnerstag, 7. Juni 2012 06:19:43 UTC+2 schrieb Peter Scott: On Mon, 04 Jun 2012 10:37:35 -0700, Marek wrote: Could somebody please tell me, how can I see into a FILEHANDLE in Perl debugger? I tried

Re: Attach iCal event to an cgi mail

2012-06-07 Thread Peter Scott
On Mon, 04 Jun 2012 10:37:35 -0700, Marek wrote: Could somebody please tell me, how can I see into a FILEHANDLE in Perl debugger? I tried with x SENDMAIL but I get only empty array. That filehandle is open for *output* in your program! What is it you want to examine? -- Peter Scott http

Re: Unblessed reference problem

2012-05-20 Thread Peter Scott
On Sun, 20 May 2012 18:28:10 +0300, Shlomi Fish wrote: Note that I think I saw a way to return the flattened array in Moose, but I don't remember the specifics. auto_deref = 1 -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx

Re: How Can I find all kinds of methods a Object support?

2012-04-12 Thread Peter Scott
for in the class itself, try superclasses. This is one case where the structured nature of documentation in more rigid languages has an edge over Perl. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http

Re: Using the ternary operator to concat a string not working like I think?

2012-04-07 Thread Peter Scott
third two second); $test{one} eq first and $test{one} .= is the worst or $test{two} .= is the best; print for values %test' third second is the best -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http

Re: Why do I get a warning?

2012-03-25 Thread Peter Scott
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

Re: Transitioning from BASH to Perl

2012-03-18 Thread Peter Scott
with this kind of approach? Tim Maher's Minimal Perl was designed for your kind of requirement: http://www.amazon.com/Minimal-Perl-UNIX-Linux-People/dp/1932394508 . -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http

Re: run command from perl

2012-03-03 Thread Peter Scott
On Fri, 02 Mar 2012 21:31:50 +0100, Manfred Lotz wrote: Another question I have: Where do I find what '-|' means? I mean the minus before the pipe char. perldoc -f open -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn

Re: run command from perl

2012-03-01 Thread Peter Scott
open: sub run_cmd { my $cmd = shift; open my $fh, '-|', $cmd 21 or die open: $!; print while $fh; close $fh; return $? 8; } -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com

Re: How to compile just the current perl module, ignoring all the other included modules

2012-01-25 Thread Peter Scott
. It sounds like some module is doing ridiculous computations in its main code instead of being encapsulated in subroutines. It should be tracked down and shot^Wrefactored. That's likely to cause all kinds of problems, so working around it like you're trying isn't really the answer. -- Peter Scott

Re: Difference between and grep EXPR,

2012-01-19 Thread Peter Scott
reading perldoc -f grep one more sentence: In scalar context, returns the number of times the expression was true. -- 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

Re: FW: Perl to python converter

2011-12-26 Thread Peter Scott
with an experienced Perl programmer that you find on somewhere like Perlmonks, and advertise that you have XML/XSLT experience to bring to the party. On this list, your options are more or less limited to asking how you can become a better Perl programmer. -- Peter Scott http://www.perlmedic.com

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

2011-12-26 Thread Peter Scott
after \{ in regex but how to span over multiple lines and make this work. Need pointers. May I suggest http://search.cpan.org/dist/Text-Balanced/ for this type of endeavor. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn

Re: ipc question

2011-12-15 Thread Peter Scott
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

Re: File health check on *nix system using stat

2011-12-12 Thread Peter Scott
that this is really how you would test to see if you could read a file. I see people using access checks all the time when they should simply be testing that they can open() the file instead. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store

Re: File health check on *nix system using stat

2011-12-10 Thread Peter Scott
is NOT ok What is the program trying to accomplish? What does ok mean for a file in the context of this exercise? The empirical derivation from the code doesn't seem useful. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn

Re: Make a script to run multiple scripts

2011-12-03 Thread Peter Scott
multiple scripts. I could just add to this file as needed if more scripts are created. What is the best way to do this? Consider spawning code rather than programs and using Parallel::ForkManager: http://search.cpan.org/~dlux/Parallel-ForkManager-0.7.9/lib/Parallel/ ForkManager.pm -- Peter Scott

Re: Simulate `sh -x'

2011-12-03 Thread Peter Scott
On Jun 24 2002, 4:44 am, davidtg-perl-beginn...@justpickone.org (David T- G) wrote: ...and then Peter Scott said... % % Would you like tracing that goes off when you go into a function? Suppose % % if you gave a numeric argument to 't' it would trace up to that depth % % in subroutine calls

Re: Perl module for Gmail

2011-11-29 Thread Peter Scott
on the server. those emails must be stored appended in a file on the local hard drive. I do this with Net::IMAP::Client. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com

Re: passing arguments to perl function with - in the string

2011-11-29 Thread Peter Scott
. -- 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

Re: need help with a form

2011-11-28 Thread Peter Scott
/contact_us.html Well, your first problem is that the action target of the form is an HTML page instead of a CGI program. What code have you got so far? -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http

Re: Fwd: RE: overriding a custom compiled perl binary

2011-11-16 Thread Peter Scott
that their installation tool then modified for the local installation. So theoretically you could edit the binary to replace the paths with anything the same length or shorter. As if you weren't out on a long enough limb already. -- Peter Scott http://www.perlmedic.com/ http

Re: Taint mode CGI problem

2011-11-11 Thread Peter Scott
. Code duplication is so enervating. -- 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

Re: bootstrap.pl for setting up my machine

2011-11-01 Thread Peter Scott
. if there are multiple flavors for some package, `pkg_add` might prompt me which one to install. system() will still let *you* interface with pkg_add. Do you want your program to be able to interface with pkg_add instead? -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com

Re: Help with Getopt::Std

2011-10-22 Thread Peter Scott
point of view anyway. There's even a program a2p that comes with perl (http:// perldoc.perl.org/a2p.html) for making transitioning automatic, if not easier. Post what you're having trouble with here and we can help. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http

Re: How to put an AND in a regex?

2011-10-13 Thread Peter Scott
in a if loop, or should I use something else? Am I missing something about why this approach won't work for you: if ( ! /\A[[:upper:]][[:upper:]]/ ! /\A[[:digit:]]/ ) Seems easier to understand. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com

Re: Updating Perl without admin

2011-10-13 Thread Peter Scott
? Install one or both to a directory you can write to and put it in your path. -- 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

Re: How to get the multiselect select box or checkbox element values WITHOUT using CGI module

2011-10-01 Thread Peter Scott
your application noticeably? Because programmer time is, in the absence of proof of anything else, the most precious resource, and so anything that takes longer than typing use CGI; is overkill. Especially if it requires downloading something not in core. -- Peter Scott http

Re: running perl script from inside another script collecting output in array

2011-09-15 Thread Peter Scott
filenames after completion to STDOUT. how can i collect them into an array variable? You would be better off calling it with backticks. Otherwise you have to try fragile techniques such as tying filehandles. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http

Re: how to calculate the uncover region

2011-09-13 Thread Peter Scott
strict; use warnings; use Set::IntSpan; # http://search.cpan.org/perldoc?Set%3A%3AIntSpan my ($diff, @sets) = map { Set::IntSpan-new( $_ ) } qw(1-100 1-20 2-28 50-100 5-38); $diff -= $_ for @sets; print $diff\n; $ ./differ 39-49 -- Peter Scott http://www.perlmedic.com

Re: unit test case for this perl code

2011-09-03 Thread Peter Scott
? Without knowing those things any well-meaning answers you could get here would probably lead you in the wrong direction. Tell us what you find out. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http

Re: Accessing IMap accounts messages via Perl.

2011-09-03 Thread Peter Scott
On Sat, 03 Sep 2011 13:39:47 +0200, werner wrote: Am 03.09.11 13:31, schrieb Sean Murphy: All. How can I access my IMap messages from Google via Perll. I wish to extract the message body only. how about Mail::IMAPClient? Or Net::IMAP::Client... -- Peter Scott http://www.perlmedic.com

Re: regex negative looking up a backtrace

2011-08-26 Thread Peter Scott
abcdefabcdef[g] [q] FAIL: qqq -- 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

Re: How to grab last element of array from split with no temporary variables?

2011-08-14 Thread Peter Scott
On Thu, 11 Aug 2011 23:30:32 -0700, John W. Krahn wrote: Peter Scott wrote: On Thu, 11 Aug 2011 16:17:51 -0700, siegfried wrote: Is there a way to do it with less typing? How can I do it without creating a temporary variable @p? Thanks, siegfried find /xyz -exec perl -e 'foreach(@ARGV){ my

Re: How to grab last element of array from split with no temporary variables?

2011-08-11 Thread Peter Scott
, siegfried find /xyz -exec perl -e 'foreach(@ARGV){ my @p=split /; rename $_, ./$p[$#p].txt } ' Try this: find /xyz -type f -print0 | perl -F/ -0lane 'rename $_,$F[-1].txt or warn $!' That should give you a good excuse to read perlrun :-) -- Peter Scott http://www.perlmedic.com/ http

Re: Choosing between look up tables

2011-07-09 Thread Peter Scott
reams of code that initializes arrays to literal lists, it's excruciating to read. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/courses/perl4/ -- To unsubscribe, e-mail: beginners

Re: discover all packages subclassing some other package

2011-06-11 Thread Peter Scott
-subclasses. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/courses/perl3/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h

Re: timestamp with milisecond

2011-06-03 Thread Peter Scott
: $ perl -MPOSIX=strftime -MTime::HiRes=time -le '$t = time; $s=sprintf % 06.3f, $t-int($t/60)*60; print strftime %H:%M:$s %d:%m:%Y, localtime $t' 20:38:44.551 03:06:2011 -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn

Re: how to do absolute redirect in perl

2011-06-02 Thread Peter Scott
of under 20 lines that we can run, tell us what output you see from running it, and what output you think you should see instead. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/courses

Re: Ten Years of Considerate Help

2011-05-31 Thread Peter Scott
of, So who put you in charge... oh yeah. This doesn't have to be difficult. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/courses/perl3/ -- To unsubscribe, e-mail: beginners

Re: [OT] Good Perl ISP's

2011-05-21 Thread Peter Scott
, although I'm not sure exactly which ones right now. And cpan ExtUtils::MakeMaker won't help since core comes before site in @INC. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com

Re: Remove all HTML tags

2011-05-21 Thread Peter Scott
. Although if all you want the text content for is further machine processing like checksums, concordance, or indexing, then this is fine. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http

Re: Rounding Date/Time

2011-05-06 Thread Peter Scott
in your locale, e.g. 2am on a day that the clocks advanced. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/courses/perl3/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org

Re: special method name start with _

2011-04-28 Thread Peter Scott
provides enough flexibility to do all kinds of things. See http://search.cpan.org/perldoc?MooseX::Privacy. (That's Moose-X, not Moo-Sex.) Class::Std can do this too. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274

Re: Fwd: how to parse complex table

2011-04-24 Thread Peter Scott
on this. I've been flirting with Perl less than a year, it's so seductive I find myself debating whether to go back to school. Heh, camels can be like that :-) -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http

Re: Creating web pages using Perl.

2011-04-23 Thread Peter Scott
popular at one time although templating makes a lot more sense. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/courses/perl3/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org

Re: Ten Years of Considerate Help

2011-04-23 Thread Peter Scott
. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/courses/perl3/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http

Nature of this list

2011-04-19 Thread Peter Scott
but this one at least had a good run and I'll be sorry if I end up leaving it too. Andy Lester had a good article about this: http://perlbuzz.com/2010/11/ think-for-perls-sake.html. But judging from the responses it seems he and I may be in a minority. -- Peter Scott http

Re: sample distribution

2011-04-19 Thread Peter Scott
just posing a question as a challenge for people to exercise their brains, this would be better off in the Perl Quiz-of-the-Week list (which hasn't seen any traffic in aeons). -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn

Re: Alternative to goto

2011-04-16 Thread Peter Scott
? Seems like you'd be better off programming in assembler if that's your priority. Execution speed hasn't been a primary concern since the '70s, if it was even one then. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn

Re: format output from system command

2011-04-16 Thread Peter Scott
to always wrap the lexical filehandle in curlies when using it as the indirect object, and I like the result a lot. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/courses/perl3

Re: Calling subroutines with the sigil

2011-04-14 Thread Peter Scott
then either you are worried about the wrong thing or you have bigger problems. Worry about speed only when (a) you've determined that your code is too slow, and then (b) you've profiled it to find out where the bottleneck is (hint: it's not likely to be in subroutine call overhead). -- Peter Scott

Re: Alternative to goto

2011-04-14 Thread Peter Scott
. Any possible justification for a GOTO would be so arcane that it is counterproductive to suggest it at all in a beginner's group. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com

Re: Calling subroutines with the sigil

2011-04-14 Thread Peter Scott
, just so it makes more sense to me and to be on the safe side, I've renamed it if_routine. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/courses/perl3/ -- To unsubscribe

Re: Alternative to goto

2011-04-14 Thread Peter Scott
a 'goto' targetting such labels. I wonder if this is a mistake in the documentation, or it is simply saying that such a goto is deprecated? Mistake by the look of it. To the discoverer go the rights of perlbug :) -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http

Re: Alternative to goto

2011-04-14 Thread Peter Scott
is so bad, why did they add it to Perl? Perl's goto is pretty old. Larry was feeling permissive and in a frame of mind to make BASIC programmers happy. He regrets it. The perldoc for goto says he has never found a reason to use it. -- Peter Scott http://www.perlmedic.com/ http

Re: Alternative to goto

2011-04-13 Thread Peter Scott
indicated to me that the person considering it has not understood the problem properly or modeled its solution well. Goto simply is not part of the vocabulary of clear coding. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn

Re: perl dd

2011-04-02 Thread Peter Scott
REFCNT = 2 FLAGS = (IOK,READONLY,pIOK) IV = 10 SV = NV(0x8a4aef0) at 0x8a367d8 REFCNT = 2 FLAGS = (NOK,READONLY,pNOK) NV = 100 -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http

Re: perl dd

2011-03-31 Thread Peter Scott
intention even better :-) -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/courses/perl3/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail

Re: PERL CGI SCRIPT killed by apache on client abort

2011-03-28 Thread Peter Scott
what it said it would do or your script's fault for not trapping an exception it needs to handle. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/courses/perl3/ -- To unsubscribe

Re: shift oo

2011-03-23 Thread Peter Scott
On Tue, 22 Mar 2011 13:41:59 -0700, Randal L. Schwartz wrote: Peter == Peter Scott pe...@psdt.com writes: my $s = Streamer-new; my $app = sub { return sub { $s-open_fh; my $writer = shift-( [ 200, [ Content-type = text/plain ], $s ] ); }; }; Peter As it stands, this doesn't make

Re: shift oo

2011-03-19 Thread Peter Scott
expects it to be an object). You need to be very conversant with code references and functional programming to be comfortable with this code. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http

Re: sub routine

2011-03-19 Thread Peter Scott
, not solve them for you. You might still get solutions - like you did here - but things will go better when you ask for learning instead. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http

Re: MRF-ERROR: Is a directory

2011-03-17 Thread Peter Scott
you posted or did someone else? Do you understand it? -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/courses/perl3/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org

Re: How does the function loading works in Perl

2011-03-02 Thread Peter Scott
it. And in the core: POSIX, for instance. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/courses/perl3/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e

Re: x,y axis graph

2011-02-16 Thread Peter Scott
://search.cpan.org/~dmaki/Google-Chart-0.05014/lib/Google/Chart.pm -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/courses/perl3/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org

Re: x,y axis graph

2011-02-16 Thread Scott Hall
appreciated. Thank you, Chris Stinemetz I use GD::Graph with cgi to create graphs on the fly. There are some examples on http://gdgraph.com/ Regards, Scott

Re: understanding the ||= operator

2011-02-13 Thread Peter Scott
Unwrapped:; $x = $x || $y; say Done; sub F::TIESCALAR{ bless [], F }; sub F::AUTOLOAD{ say $F::AUTOLOAD } ' Orcish: F::FETCH Unwrapped: F::FETCH Done F::DESTROY F::DESTROY -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn

Re: Dereference Links

2011-01-23 Thread Peter Scott
. You'll have a much easier time using WWW::Mechanize and many more people will be in a position to help you. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/courses/perl3

Re: advangtes of Perl on various languages

2011-01-06 Thread Peter Scott
of those possibilities and more would have radically different answers and you have not provided any information to differentiate between them. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http

Re: Function to print Object properties

2011-01-06 Thread Peter Scott
. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/courses/perl3/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http

Re: perl training material and excercises for freshers

2011-01-03 Thread Peter Scott
suggestions also for training. Web-based training with instructor feedback at the O'Reilly School of Technology: http://www.oreillyschool.com/courses/perl1/ -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274

Re: 1st line of perl script

2011-01-03 Thread Peter Scott
On Tue, 04 Jan 2011 01:09:56 -0500, George Worroll wrote: On Windows, that line is just a comment. Neither the operating system nor the interpreter does anything with it. Not quite. Any options on the line (e.g., -T) will be activated. -- Peter Scott http://www.perlmedic.com/ http

Re: advangtes of Perl on various languages

2011-01-03 Thread Peter Scott
career path then we'd need to know a lot more about what your priorities and background are. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/courses/perl3/ -- To unsubscribe, e-mail

Re: Strategy for diagnosing context-sensitive bug

2010-12-07 Thread Peter Scott
than retype it, I googled and found it in a Perl Journal article saved at http:// www.foo.be/docs/tpj/issues/vol4_3/tpj0403-0008.html . -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com

Re: Strategy for diagnosing context-sensitive bug

2010-12-07 Thread Peter Scott
thing. True, it won't be easy, but if you can come up with a test for whatever bug you are experiencing, it will be invaluable for saving time later. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http

Re: Monitoring ssh connectivity to a server using perl !

2010-11-23 Thread Peter Scott
-ping (localhost) or warn SSH down' -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/courses/perl3/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e

Re: Email Filter Script

2010-10-22 Thread Peter Scott
alters the messages in the following ways: Can you create a redirection rule instead? http://office.microsoft.com/en-us/outlook-help/automatically-forward- messages-to-another-e-mail-account-HA001150201.aspx -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http

Re: PERL MYSQL query IF EXISTS then UPDATE else INSERT

2010-10-20 Thread Peter Scott
what the feeding habits of emus are because you used your car to drive to the zoo. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/courses/perl1/ -- To unsubscribe, e-mail: beginners

Re: perl for systemadministration

2010-10-20 Thread Peter Scott
On Wed, 20 Oct 2010 17:09:17 +0530, Jyoti wrote: I need your help. Please tell me a good book for perl for system administration. Perl for System Administration -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274

Re: How can I open a remote ssh session with perl

2010-08-28 Thread Peter Scott
not want to execute command on server it should be examined via my script and then it should get executed . Let me know if this is possible using perl or I have to use any other scripting language like python. Yes, the documentation for Net::SSH::Perl explains how. -- Peter Scott http

Re: How can I open a remote ssh session with perl

2010-08-27 Thread Peter Scott
an interactive program that won't terminate without user input. Neither will iostat 1 terminate; but iostat 1 10 works fine, just got to wait 10 seconds. I don't see anything in your pstree output that looks truncated. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http

Re: How can I open a remote ssh session with perl

2010-08-26 Thread Peter Scott
the module isn't built right, you have the wrong credentials, you aren't connecting, or the remote end doesn't have the right environment, something like that. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http

Re: How can I open a remote ssh session with perl

2010-08-24 Thread Peter Scott
. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/courses/perl1/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http

Re: Perl obfuscator

2010-08-23 Thread Peter Scott
, not by modifying what perl sees. http://www.stunnix.com/prod/po/overview.shtml : Now, I haven't used it. But it does claim to be an exception to your rule. The users manual has a section on what to do about symbolic name construction. -- Peter Scott http://www.perlmedic.com/ http

Re: Perl obfuscator

2010-08-21 Thread Peter Scott
make, trying to understand and change a large body of code that has the worst names possible may not be impossible, but still is excruciating. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http

  1   2   3   4   5   6   7   8   9   10   >