Re: Perl Code

2012-09-09 Thread Chris Nehren
> > > > i've never seen anyone do it correct in production. Unless they use Email::Valid or Email::Address. I'm sorry you haven't had the opportunity to work with people who are clueful about email. -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Systems

Re: Perl Code

2012-08-31 Thread Chris Nehren
sn't know Perl or regular expressions if they're asking for those things to be done with only regex. At least three items on that list are best done with CPAN modules. My advice is to drop the class now and get a refund, if at all possible. -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Systems Ltd. | http://shadowcat.co.uk/ pgpZ0Q9z5gjRm.pgp Description: PGP signature

Re: Mail::Sender with SSL

2012-08-15 Thread Chris Nehren
On Thu, Aug 16, 2012 at 00:05:56 +0200 , Jenda Krynicky wrote: > From: Chris Nehren > > On Tue, Aug 07, 2012 at 17:38:57 + , Thomas Dean wrote: > > > Hi there, > > > > > > I have succeeded in sending mail to my SMTP server with Mail::Sender > > >

Re: Mail::Sender with SSL

2012-08-07 Thread Chris Nehren
ly maintained or developed any more and just receives an occasional bug fix. -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Systems Ltd. | http://shadowcat.co.uk/ pgpPiAnIglL4G.pgp Description: PGP signature

Re: case statement in perl

2012-08-01 Thread Chris Nehren
As for Switch.pm, it has been removed from perl core. -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Systems Ltd. | http://shadowcat.co.uk/ pgprSLgwr7Uhb.pgp Description: PGP signature

Re: case statement in perl

2012-08-01 Thread Chris Nehren
smart for its own good, I agree with everything here. When uri and I agree on something, it's a strong indicator to pay attention. -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Systems Ltd. | http://shadowcat.co.uk/ pgpWgsnYFeliD.pgp Description: PGP signature

Re: case statement in perl

2012-07-31 Thread Chris Nehren
> > > Paul Don't use Switch.pm. It's a source filter and causes indeterministic code evalution. See perldoc -q switch on a recent perl (5.12 or so or above). Consider a dispatch table. -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Systems Ltd. | http://shadowcat.co.uk/ pgpzHvtoASnYU.pgp Description: PGP signature

Re: return two varibles

2012-06-07 Thread Chris Nehren
eturn($start, $end) if $val eq $k; > > } > > return ""; > > return; > > >} > > A return with any argument will return undef in scalar context, () in > list context. This is considered better than return an empty string. ITYM *without* a

Re: mod_perl for n00bs

2012-06-04 Thread Chris Nehren
On Mon, Jun 04, 2012 at 11:36:21 -0400 , Mark Haney wrote: > On 06/04/2012 09:57 AM, Chris Nehren wrote: > > > > >Erg. CGI.pm is a terrible idea--runtime string eval and all that > >silliness. Please investigate one of the lighter Plack/PSGI frameworks > >like

Re: mod_perl for n00bs

2012-06-04 Thread Chris Nehren
On Mon, Jun 04, 2012 at 08:42:43 -0400 , Mark Haney wrote: > On 06/03/2012 07:30 PM, Chris Nehren wrote: > > >Don't, unless you're writing Apache modules in Perl. There are much > >better choices for doing web dev in Perl, like Catalyst, Dancer, > >Web::Simp

Re: mod_perl for n00bs

2012-06-03 Thread Chris Nehren
imple, etc., which all use Plack/PSGI. These can all be deployed on any web server. -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Systems Ltd. | http://shadowcat.co.uk/ pgp2T18hbmqFL.pgp Description: PGP signature

Re: Using perlbrew to change Perl version for scripts

2012-06-02 Thread Chris Nehren
. From a CGI or cron(1) job, it runs the OS-installed > version. Surely you can put the relevant lines into your crontab or web server config, or use a wrapper script that sources things? This is Not Hard™. -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Systems Ltd. | http://

Re: Using perlbrew to change Perl version for scripts

2012-06-02 Thread Chris Nehren
gt; This has the advantage of not having to run your profile to get the > correct version of perl and when you upgrade, you just have to change > the symlink to upgrade all your scripts. And the disadvantage of clobbering whatever's in /usr/local/bin/perl, defeating the point of perlbrew in t

Re: Bareword and strict subs

2012-05-31 Thread Chris Nehren
my $attrs = @_; > > This will store the number of elements in the array @_ into $attrs. > Why do that when this is simpler: > > $obj->insert_shift( scalar @array ); Probably because there's supposed to be () round the $attrs and we both missed it. :) -- Chris Nehr

Re: Bareword and strict subs

2012-05-31 Thread Chris Nehren
the new method on ::ResultSet classes is defined as taking \%attrs, probably not. -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Systems Ltd. | http://shadowcat.co.uk/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: spreadsheet::xlsx and the horror of it all

2012-05-30 Thread Chris Nehren
sheet::ParseExcel to extract information > from the xls file. > > Please trim your replies to the list. The extra 200+ lines included > from the previous replies were irrelevant in asking your question. > > Thanks. Please wrap your lines at 80 characters or less (preferably 72).

Re: Perl HTTP Get

2012-05-30 Thread Chris Nehren
val returns a result? eval is a function, not a block construct like for/while/if. This means that you need the semicolon after. See also https://metacpan.org/module/Try::Tiny#BACKGROUND for things you need to know when using eval. You don't *have* to use Try::Tiny*, but knowing what i

Re: Perl HTTP Get

2012-05-30 Thread Chris Nehren
imple API--it's not as flexible as something more complex. This is one of the fundamental tradeoffs of programming. -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Systems Ltd. | http://shadowcat.co.uk/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Perl HTTP Get

2012-05-27 Thread Chris Nehren
nsider using the core alarm() function, or using LWP::UserAgent (I'm guessing you're using LWP::Simple here, which is just a wrapper around LWP::UserAgent) and specifying the timeout attribute on that object. -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Systems Ltd.

Re: going to yapc::na?

2012-05-25 Thread Chris Nehren
ore info, and hop on irc.perl.org #yapc to talk in real time. Also, get on the mailing list if you're not already: http://mail.pm.org/mailman/listinfo/yapc . YAPC is a great experience, and one of the better ways to get more involved with Perl, both socially and technically. --

Re: Unblessed reference problem

2012-05-20 Thread Chris Nehren
on't remember the specifics. > > > > > > > > > auto_deref => 1 > > > … which is semi-deprecated/recommended to avoid - see I thought it was more than just semi-deprecated and that there are plans to remove it soon. Either way, it is indeed be

Re: Tie::Syslog outputs "localhost" instead of actual host name

2012-05-18 Thread Chris Nehren
ttle-tested, reasonably solid, and satisfies the syslog requirement (the fact the maintainer is pingable via IRC helps a lot, too). -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Systems Ltd. | http://shadowcat.co.uk/ -- To unsubscribe, e-mail: beginners-unsubscr...@per

Re: Creating letter combination generator

2011-07-10 Thread Chris Nehren
n. So it's better to help those stuck with such decisions. *: With one notable exception, though somehow I doubt the cookbook would have examples for dealing with the ebxml standard. :) -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Systems Ltd. | http://shadowcat.co.uk/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: understanding adding numeric accumulator

2011-07-10 Thread Chris Nehren
7;s roughly equivalent to print with a \n added to the end. If you don't have 5.10.1 or above installed, read the docs for say here: http://p3rl.org/say . -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Systems Ltd. | http://shadowcat.co.uk/ -- To unsubscribe, e-mail:

Re: Need help for interview

2011-07-10 Thread Chris Nehren
7;s Modern Perl as a refresher on how many people write Perl these days. -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Systems Ltd. | http://shadowcat.co.uk/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Use of uninitialized value warnings

2011-06-06 Thread Chris Nehren
the client and work machines I've used, I've not had to worry about using 5.10 features. If I can use them without qualms in code targetting Debian and RedHat, most folks won't have to worry. -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Systems Ltd. | http://shado

Re: draw html tables and send in mail

2011-06-06 Thread Chris Nehren
HTML parts. (Note that you're going to need to figure out how to > represent your HTML table in text form.) There's Text::Table on CPAN that I've found to be extremely useful for precisely this task. Can't recommend it highly enough. -- Chris Nehren | Coder,

Re: variable name in 'data' ... don't really know how to say it...

2011-06-06 Thread Chris Nehren
more specific in what's going wrong, we can help. -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Systems Ltd. | http://shadowcat.co.uk/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: How to handle the Redirected using Scrappy Module

2011-05-31 Thread Chris Nehren
"handle the Redirect"? I'm afraid your question isn't clear. -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Systems Ltd. | http://shadowcat.co.uk/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Rsync options not recognized by system function

2011-05-31 Thread Chris Nehren
is generally a better idea unless the shell variable interpolation behavior is desired. -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Systems Ltd. | http://shadowcat.co.uk/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Extremely fast template processor

2011-05-31 Thread Chris Nehren
are, and programmers are notoriously bad at guessing. -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Systems Ltd. | http://shadowcat.co.uk/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: practical perl guides.

2011-05-31 Thread Chris Nehren
ith & which is unwise) but otherwise it's a fine text on which most of the experts here cut their teeth. _Beginning Perl_ is another suitable text (the first edition is available free online at http://p3rl.org/bp ). -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Sys

Re: reg exp

2011-05-31 Thread Chris Nehren
d. Additionally, if you're doing lots of date/time manipulation, consider DateTime.pm and DateTime::Format::Strptime, which uses strptime(3) to create DateTime objects. -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Systems Ltd. | http://shadowcat.co.uk/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Basic question on arrays $ vs @

2011-05-31 Thread Chris Nehren
r is $critter\n"; } This way you don't need to keep track of how many items you have. It's less code to read, less code to write, and fewer places for failure all around. Also, to be sure, the only difference between for and foreach is expressly and specifically four characters:

Re: problem with dbi oracle blob

2011-05-31 Thread Chris Nehren
with a lexical filehandle, though, like so: open my $xml, '>', './xmlfile' or die ... This way is safer and more robust, plus $xml is easier to deal with than the global XML (try passing XML to a function: it's not immediately obvious how). I can't see this as

Re: How to handle the Redirected using Scrappy Module

2011-05-31 Thread Chris Nehren
version). > Any one suggest me to handle the Redirect. What do you mean by 'handle the Redirect'? Your message isn't clear. -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Systems Ltd. | http://shadowcat.co.uk/ -- To unsubscribe, e-mail: beginners-unsubscr...@pe