Re: Problem with DBI and placeholders

2021-04-09 Thread Lawrence Statton
On 4/9/21 7:11 AM, mailing lists via beginners wrote: thanks Andrew I need to insert millions of rows so I need to have a good performance using placeholders You can not use placeholders for the table name. If you have millions of *tables*, there is something very, very, very wrong with

Re: XML::LibXML and comments

2018-09-10 Thread Lawrence Statton
> On Sep 10, 2018, at 6:33 AM, John Cortland Morgan > wrote: > > Hi, > > I'm trying to place a comment directly after the XML declaration using > XML::LibXML, > But cannot seem to manage, always receiving error: > > setDocumentElement: ELEMENT node required at .../LibXML.pm line 1393 > >

Re: Counting elements returned from expression

2016-10-03 Thread Lawrence Statton
On 10/03/2016 06:17 PM, khalil zakaria Zemmoura wrote: Hi, I am reading modern Perl and despite the explanation of the author I couldn't understand: my $count = () = get_clown_hats() It's obvious to me that the function get_clown_hat() is evaluated in list context but what the author said is th

Re: How to navigate through a hash of hashes of arrays (?) to get to the first array entry

2016-04-13 Thread Lawrence Statton
On 04/13/2016 08:29 PM, Kenneth Wolcott wrote: Hi; I have the following output from Data::Dumper and I want to extract the first string that the "Id" name points to. $VAR1 = [ bless( { 'Id' => [ '01tC003udXAIAY',

Re: Fwd: Re: LWP/Protocol Errors

2015-05-27 Thread Lawrence Statton
On 05/27/2015 07:33 AM, Mike Blezien wrote: *CONNECTED(0003) --- no peer certificate available --- No client certificate CA names sent --- SSL handshake has read 0 bytes and written 0 bytes --- New, (NONE), Cipher is (NONE) Secure Renegotiation IS NOT supported Compression: NONE Expansion:

Re: LWP/Protocol Errors

2015-05-26 Thread Lawrence Statton
On 05/25/2015 12:02 PM, Mike Blezien wrote: Hello *I use same IPN script on other servers without any issues except one. Is it possible that port 443 is being block or not open due a firewall on the server? Another tidbit of information that just burbled to the top of my brain. On SOME plat

Re: LWP/Protocol Errors

2015-05-26 Thread Lawrence Statton
On 05/25/2015 12:02 PM, Mike Blezien wrote: Hello, I recently setup a Paypal IPN script which worked fine for some time now but now all of a sudden I keep getting these error message: * **Can't connect to www.paypal.com:443 (certificate verify failed)** **LWP::Protocol::https::Socket: SSL conn

Re: Argument isn't numeric warning in if statement

2014-09-17 Thread Lawrence Statton
On 09/17/2014 12:46 PM, SSC_perl wrote: > On Sep 16, 2014, at 6:58 PM, > wrote: >> Are you sure you've quoted the code (that's producing the warning) correctly? > > Yes, I did. I double-checked it just to be certain. However, I ran > the code by itself and it doesn't produce that warni

Re: Fetching File Creation Date

2013-08-16 Thread Lawrence Statton
On 08/16/2013 04:25 PM, John Aten wrote: > Hi all, > [deletia] > Does anyone know if this is possible? Or should I just accept the > fact that all dates before 8/2013 are suspect? > There is no datum that is closely correlated to the "file creation" time. -- To unsubscribe, e-mail: beginners-u

Re: Help on regex

2013-08-14 Thread Lawrence Statton
On 08/14/2013 11:26 AM, *Shaji Kalidasan* wrote: > my ($name, $phone, $address) = /^([a-zA-Z ]+):([\-\d]+):([\w, ])$/; And here is your second problem ... the "name" part matches. The phone-number part matches if you either fix the numbers in the source data, or allow — in the regexp THe ad

Re: Help on regex

2013-08-14 Thread Lawrence Statton
On 08/14/2013 11:26 AM, *Shaji Kalidasan* wrote: > Greetings, The first thing I noticed -- I cut and paste your text, and many of the characters embedded in your telephone numbers are not "-" but "—" (dash versus mdash) which would certainly cause your regexp to fail to match telephone numbers. >

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

2013-07-03 Thread Lawrence Statton
On 07/03/2013 12:13 PM, Robert Freiberger wrote: Hello everyone, 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 intern

Re: make and Makefile.PL

2013-05-28 Thread Lawrence Statton
On 05/28/2013 12:09 PM, Rahim Fakir wrote: My system does not have Makefile.PL so what do i do??? Regards Ray Makefile.PL is a file that is included with every package from CPAN. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl

Re: script dies when Net::DNS resolve fails

2013-05-13 Thread Lawrence Statton
On 05/13/2013 10:53 AM, Noah wrote: When Net::DNS resolved name is not found my script dies. How can I allow for my script to continue on even if there is a failed DNS query? Impossible to say -- you do not show enough to know what is happening AFTER the block shown. -- To unsubscribe, e-ma

Re: Can we use string as variable name

2013-04-30 Thread Lawrence Statton
On 04/30/2013 12:07 PM, Piyush Verma wrote: Hi, I want to use string as a variable name, please explain if there is any way in perl. Yes, there is a way. It is almost always a better idea to NOT do it that way, but to refactor your code to not require using a string as a variable name. P

Re: Date::Manip DateCalc

2013-03-29 Thread Lawrence Statton
On 03/29/2013 03:01 PM, Grant wrote: I'm getting strange results from a business days calculation with Date::Manip. Everything works as expected if I use a number of days between 1 and 6, but after 6 the resulting date doesn't seem to be based on business days. It is worth noting - the docume

Re: Mechanize: first attempt at scraping (should be something trivial)

2013-03-13 Thread Lawrence Statton
On 03/13/2013 01:46 PM, Andy Bach wrote: Wide character in print at /usr/local/bin/mech_test.pl line 18. that's the print page. By the way -- you can eliminate the wide-char warniung by telling perl that your terminal can eat UTF-8 encoded unicode binmode STDOUT, ":utf8"; -- To unsubscri

Re: Net::DNS

2013-03-07 Thread Lawrence Statton
On 03/07/2013 10:21 AM, shawn wilson wrote: use Data::Dumper; use Net::DNS::Resolver; my $dns = Net::DNS::Resolver->new; print rev_ip('8.8.8.8') . "\n"; sub rev_ip { my ($ip) = @_; my $packet = $dns->search($ip); my @authority = $packet->authority; my $string = join ', ', map { $_

Re: .profile not being read

2013-02-14 Thread Lawrence Statton
On 02/14/2013 08:47 AM, Gerard Walschap wrote: I just installed perl on my Mac following the instructions on the perl.org website. It seems to work, as "perl -v" returns "This is perl 5, version 16, subversion 0 (v5.16.0) built for darwin-2level..." The thing is that the comman

Re: obfuscating code

2013-02-12 Thread Lawrence Statton
On 02/12/2013 11:01 AM, Rajeev Prasad wrote: freinds, what is the advice just for obfuscating code? platform is solaris. ty. Don't. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: t character in regular expression

2012-10-25 Thread Lawrence Statton
On 10/25/2012 03:57 PM, Weidner, Ron wrote: In the following regex what is the "t" character doing? $linebuf =~ tr/\n/:/; There is no regexp - there is a tr operator perldoc perlop tr/SEARCHLIST/REPLACEMENTLIST/cds y/SEARCHLIST/REPLACEMENTLIST/cds Transliterates all occurrences of t

Re: Perl module for CSV output

2012-10-24 Thread Lawrence Statton
On 10/24/2012 10:58 AM, jet speed wrote: Hi All, i have a requirement to output of hash from a perl script into a CSV format. Please could you advice what is the best perl module to achieve this. Thanks Sj Either Text::CSV or Text::CSV_XS depending on your bias for Pure-Perl. -- To unsubs

Re: XML file error

2012-10-07 Thread Lawrence Statton
On 10/07/2012 10:37 AM, Ajaykumar Upadhyay wrote: Hi, There is one XML file, while opening at any browser it will error. And while seeing the source of XML, all are correct. There is some truncated character in XML file who does not allow to display properly on browser. What do you mean t

Re: Array elements in Hash

2012-10-04 Thread Lawrence Statton
On 10/04/2012 11:26 AM, jet speed wrote: Hi All, I am trying to find the array elements in hash, if it matches then print the hash value. Please help me to achieve this. Note: array elements matches the first 2 characters of the hash keys. @match = ("6c7b00", "6d7b00", "6d9d8f", "6c6863", "6

Re: xml parsing

2012-08-16 Thread Lawrence Statton
Okay -- I've looked at the attachment -- remember when I mentioned namespaces a while back? This document uses one, so things get more complicated. The solution I always use for this is to put the root element into an XPath Context object and assign a prefix for the default namespace (I wa

Re: xml parsing

2012-08-16 Thread Lawrence Statton
please find the attached xml file. please suggest. regards irfan The file attached does not match the sample XML file you included in your email. The string passed to findnodes() is called an "XPath Selector" - you will need to adjust that to match the actual path of the elements you

Re: xml parsing

2012-08-16 Thread Lawrence Statton
On 08/16/2012 08:09 AM, Irfan Sayed wrote: thanks. it worked however, i cant give xml file path instead of all the contents in the start tag<< regards, irfan (BTW: The custom on this list is NOT to top post -- trim, and put your replies at the BOTTOM of the email you are responding to) Ca

Re: xml parsing

2012-08-16 Thread Lawrence Statton
On 08/16/2012 07:46 AM, Irfan Sayed wrote: can you please give me sample code to store the xml contents to perl array using LibXML lets say xml files is as : regards irfan I'm going to assume what you wanbt is the list of Included filenames... #!/usr/bin/perl use st

Re: MIME::Lite setup

2012-08-03 Thread Lawrence Statton
On 08/03/2012 06:17 AM, Mike Blezien wrote: Hello, We've been using the MIME Lite module for some time now. I need to set it up now so one of our scripts so the when some one replies to an email sent that the replies to a 'Reply-To' address instead of the 'From' address. Here how I have it co

Re: Package modules and EXPORTER use

2012-08-02 Thread Lawrence Statton
On 08/02/2012 09:51 AM, Mark Haney wrote: On 08/02/2012 09:57 AM, Shlomi Fish wrote: Hi Mark, So, should I use it? Does it really matter in small apps? What am I missing here? Can you give a code sample that reproduces the issue? Let me see if I can explain better. I have a Package cal

Re: shift vs @_

2012-05-21 Thread Lawrence Statton
On 05/21/2012 03:12 PM, sono...@fannullone.us wrote: Hi Paul, Please don't care about this until your code is running correctly but too slowly and profiling has determined that this is the bottleneck. I'm curious as to why you say this. If one way is faster than another, wouldn't it

Re: Updating my IP address in real time

2012-05-03 Thread Lawrence Statton
On 05/03/2012 01:44 PM, Terry Shepherd wrote: I like the idea of it being in our zone. Yes, I am running bind - can I hire you to help me configure the server for this? I think I can do it, but it looks like you have done this before already. Yes, I'd be glad to. Let's go off-list and set

Re: Updating my IP address in real time

2012-05-03 Thread Lawrence Statton
On 05/03/2012 01:02 PM, Terry Shepherd wrote: Wow. Thanks for the fast response. This is amazing. You're welcome. I'm pretty sure on this list, the custom is not to top-post. No, I did not work for that station. I am in San francisco and was in elementary school during the 80s. "You

Re: Updating my IP address in real time

2012-05-03 Thread Lawrence Statton
On 05/03/2012 12:25 PM, Terry Shepherd wrote: For a project at work, I need to have my development machine here at my house reachable via a name. I don't have static IP from my ISP (they offer it, but it's an expensive add-on). I have the router configured so that if you go to http://205.178.x.

Re: Template toolkit issue [SOLVED]

2012-05-03 Thread Lawrence Statton
On 05/03/2012 10:18 AM, Lawrence Statton wrote: I'll follow up to my own response in a few minutes with a trivial program that produces content without using CGI.pm I need to configure a webserver to do CGI which I have none at hand. As promised: A minimal perl program to produce co

Re: Template toolkit issue [SOLVED]

2012-05-03 Thread Lawrence Statton
On 05/03/2012 09:19 AM, Mark Haney wrote: On 05/03/2012 09:06 AM, John SJ Anderson wrote: Okay, perhaps that was hyperbole on my part. Although, honestly, I included all the other things websites can do not just output HTML. And you can do all of those things with Perl. You just need to pi

Re: Template toolkit issue [SOLVED]

2012-05-03 Thread Lawrence Statton
On 05/03/2012 07:41 AM, Mark Haney wrote: On 05/02/2012 03:53 PM, Octavian Rasnita wrote: I'm really quite intrigued by the assertion that CGI is very seldom used. Well, do you mean "CGI.pm" the perl module, which is, AFAIK rarely used any more except in legacy applications. Gosh knows

Re: Template toolkit issue

2012-05-02 Thread Lawrence Statton
On 05/02/2012 09:55 AM, Mark Haney wrote: On 05/02/2012 10:44 AM, Robert Wohlfarth wrote: On Wed, May 2, 2012 at 9:19 AM, Lawrence Statton wrote: Whitespace between the end of the HTTP headers and te beginning of HTML content is immaterial. Does the test script send back HTTP headers? The

Re: Template toolkit issue

2012-05-02 Thread Lawrence Statton
On 05/02/2012 09:13 AM, Mark Haney wrote: On 05/02/2012 09:58 AM, Lawrence Statton wrote: You are most likely not sending an appropriate Content-Type header. I didn't think about that, but when I went back and specified the Content-Type as text/html I still get the same problem. Ho

Re: Template toolkit issue

2012-05-02 Thread Lawrence Statton
On 05/02/2012 08:29 AM, Mark Haney wrote: Okay, I've bit the bullet and started mucking with the perl template toolkit instead of mixing PHP and perl. But I've hit a bizarre problem and I hope someone can point me to a fix. I'm stumped. I've been following the base static and dynamic content gen

Re: how to get two matches out

2012-04-29 Thread Lawrence Statton
On 04/29/2012 10:41 AM, lina wrote: On Sun, Apr 29, 2012 at 11:26 PM, Lawrence Statton wrote: On 04/29/2012 10:21 AM, lina wrote: Hi, I have a text file like: $ more sample.tex aaa \cite{d1,d2},ddd \cite{e1},ccc \cite{f1,f2,f3} bbb\cite{inhibitor}aaa sub read_tex{ open my $fh

Re: how to get two matches out

2012-04-29 Thread Lawrence Statton
On 04/29/2012 10:21 AM, lina wrote: Hi, I have a text file like: $ more sample.tex aaa \cite{d1,d2},ddd \cite{e1},ccc \cite{f1,f2,f3} bbb\cite{inhibitor}aaa sub read_tex{ open my $fh, '<', @_; while(<$fh>){ if(/cite\{(.+?)\}/){ push @citeditems

Re: Problem with unless statement

2012-04-28 Thread Lawrence Statton
On 04/28/2012 09:16 AM, sono...@fannullone.us wrote: I'm having a problem with the following code: #!/usr/bin/perl use strict; use warnings; my $xtra = 'mail.example.com'; my $host = 'localhost' unless (defined ($xtra)); print $host; I get the message "Use of uninitialized va

Re: XML parsing question

2012-03-15 Thread Lawrence Statton
On 03/15/2012 09:11 AM, Anirban Adhikary wrote: > I am writting a following code to parse this xml but not able yo understand > that why the value of $bsc_id_1 getting changed. > here is my code > > use strict; > use warnings; > > my $xml_file_to_read = "BSC-19478.xml"; > my $counter = 1; > my $

Re: perl and pattern

2012-02-21 Thread Lawrence Statton
On 02/21/2012 01:47 PM, Vyacheslav wrote: Hello. I'm new in perl and have many questions. This my first programm. #!/usr/bin/perl use strict; use warnings; EXCELLENT START! my $number = 0; my $_ = 0; print "Enter number:"; chomp($number = <>); if ( $number = /[0-9]/) { You want the matc

Re: website vs web app

2011-09-17 Thread Lawrence Statton
On 09/17/2011 08:51 PM, Rob Dixon wrote: On 17/09/2011 20:10, Lawrence Statton wrote: On 09/16/2011 06:10 PM, Rajeev Prasad wrote: why do i need a web app? becuase of size of my project? I mean if it is going to be a very big website with lot of pages and tables etc. should i have a webapp

Re: website vs web app

2011-09-17 Thread Lawrence Statton
On 09/16/2011 06:10 PM, Rajeev Prasad wrote: why do i need a web app? becuase of size of my project? I mean if it is going to be a very big website with lot of pages and tables etc. should i have a webapp? apache and cgi wont cut it? (alongwith other technologies used commonly in websites)

Re: utf8 and md5.

2011-05-05 Thread Lawrence Statton
On 05/05/2011 10:53 AM, apm wrote: I have old legacy code on .net 1.1 c# Byte[] clearBytes = new UnicodeEncoding().GetBytes(cleanString); Byte[] hashedBytes = ((HashAlgorithm) CryptoConfig.CreateFromName("MD5")).ComputeHash(clearBytes); return BitConverter

Re: call method by name

2011-04-12 Thread Lawrence Statton
On 04/12/2011 08:26 AM, marcos rebelo wrote: Hi all I have a code like: foreach my $key ( ... ) { my $sub = "get_$key"; $self->$sub; ... } If I can do this, I can also do it without the variable $sub. What is the syntax? please Best Regards Marcos Rebelo #!/usr/bin/perl use str

Re: perl web apps

2010-11-22 Thread Lawrence Statton
On 11/22/2010 09:02 AM, shawn wilson wrote: any of y'all write web apps in perl? what do you use? i'm using html::template but i was thinking of going back to straight cgi.pm or having my perl send back json for the page to render (but i'm not that familiar with js). thoughts? Your major unwri

Re: Ternary operator: Am I missing something?

2010-03-29 Thread Lawrence Statton
On Mar 29, 2010, at 10:54 AM, r...@i.frys.com wrote: I looked through perlop and was unable to find where it stated that the ternary operator should only be used in an assignment such as you've shown. Can you point out where that's located. In my reasonably-arrogant opinion: That's kind of

Re: variables and sql-statements within perlscripts

2009-09-28 Thread Lawrence Statton
On Sep 28, 2009, at 11:01 AM, Ruprecht Helms wrote: Hi, How have I to write the sql-statement if I want to use variables like this: Don't.http://xkcd.com/327/ The value of the variable can have the value of another recordsetloop or a value come from outsite the script. Regards,

Re: match and putting in a variable with a single statement

2008-10-24 Thread Lawrence Statton
> > I was just trying to match a string and save it in a single statement > as follows: > > $extracted = "cp xyz"; > $state_var = $extracted =~ m/cp\s+(.*)/; > print "$state_var $1 \n"; > > The output is: 1 xyz > > So the assignment to $state_var does not work. Is this an incorrect way. > The

Re: How to check empty hash value properly?

2008-10-08 Thread Lawrence Statton
> This distinction between canonical existence and logical existence--or > perhaps more properly the distinction between the existence of an > element and of a position--is important because, while useful, the > distinction does have implications for the value of $#array, the > return value of scal

Re: $o->document vs $o->document()

2008-10-08 Thread Lawrence Statton
> I am using a module having documentation saying document() is a > method. However, I see it used as > > $o->document; > > Can you reference a method in this way? (I takes no args). I always > thought > > $o->document() and $o->document meant different things, function > verses attribute. >

Re: diff says memory exhausted need help with perl

2008-03-28 Thread Lawrence Statton
If you're using Gnu diff (i.e. the diff that comes with most Linuces) --speed-large-files might help you, without having to jump through a perl hoop. --L -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: reference to subroutine???

2008-03-27 Thread Lawrence Statton
sanket vaidya wrote: >Whereas the output on perl 5.6.1 is > >Hello!!1 Ummm, beg to differ #!/usr/bin/perl use strict; use warnings; sub hello; my $ref = \&hello; &{$ref}; sub hello { print "hello!!"; } [EMAIL PROTECTED]:~$ perl -l pbml.pl hello!! [EMAIL PROTECTED]:~$ perl -v This is

Re: Referencing a hash to be dereferenced...

2007-11-06 Thread Lawrence Statton
eeding skils. -- Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g Computer software consists of only two components: ones and zeros, in roughly equal proportions. All that is required is to place them into the correct order. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: Referencing a hash to be dereferenced...

2007-11-06 Thread Lawrence Statton
> I have a function in a lib that we use that has two referenced > hashes. No, you have a method in a class that has two referenced hashes. Computers are frustratingly pedantic, and mastering the art requires the same level of attention do detail at the human leve. > > > > my $zone = $se

Re: line-equation program gives wrong results

2007-10-23 Thread Lawrence Statton
> > $slope = ($ARGV[1] - $ARGV[3]) / ($ARGV[0] - $ARGV[2]); > $b = $ARGV[1] - ($ARGV[0] * $slope); > print "\n$ARGV[1] = $slope * $ARGV[0] + $b\n"; > > For this input : > > perl my_program 16.81 16.57 0 0 > > It gives me this result : > > 16.57 = 0.985722784057109 * 16.81 + 0 > > Clearly

Re: (OT) Re: sourcing one perl file from another

2007-10-22 Thread Lawrence Statton
> It is also is a stand-alone command to interpret Tcl scripts. I'd guess > Tcl was the original source of source and was adopted by BASH and other > shells afterwards. I don't know anything about Tcl but maybe it has a > group of functions along the lines of file-type file-name. > I'd find tha

Re: manipulating csv file fields through perl

2007-08-28 Thread Lawrence Statton
; > > > > 'SomeName20070827.csv'}; > > # tie the table name to the filename ... here you can see they are mapping a table SomeName to the file "SomeName20070827.csv" -- Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g Computer software consists of on

Re: How to convert csv file to excel

2007-08-14 Thread Lawrence Statton
> > Can anybody help me how to convert csv file to excel file using Perl > or Shell scripts? > I would use Text::CSV_XS to read the CSV file and SpreadSheet::WriteExcel to produce the Excel file. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Perl LWP post to a web form

2007-08-10 Thread Lawrence Statton
n, only the author of index.php would know for sure but passing in '3' where the word 'number' is expected in the searchtype field may lead to your lack of joy. Not passing in any value for 'query' might also be causing grief. -- Lawrence Statton - [EMAIL PROT

Re: slices

2007-08-08 Thread Lawrence Statton
> From [EMAIL PROTECTED] Wed Aug 8 15:44:30 2007 > Return-Path: <[EMAIL PROTECTED]> > X-Original-To: [EMAIL PROTECTED] > Delivered-To: [EMAIL PROTECTED] > Received: from localhost (localhost [127.0.0.1]) > by hummer.cluon.com (Postfix) with ESMTP id 25F66339A0 > for <[EMAIL PROTECTED]

Re: Timelocal's input parameters

2007-08-08 Thread Lawrence Statton
foo = ( one => 'uno', two => 'dos', three => 'tres' ); is equivalent to ... my %foo; $foo{one} = 'uno'; $foo{two} = 'dos'; $foo{three} = 'tres'; -- Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g

Re: Processing Arguments

2007-07-06 Thread Lawrence Statton
nt? > /tmp/* got expanded into a list of filenames matching that glob by the shell long before Perl got involved. You need to escape or quote your arguments such that the shell won't glob filenames before launching your script. ./sr "/tmp/*" -- Lawrence Statton - [EMA

Re: Creating 100 buttons!

2007-05-06 Thread Lawrence Statton
ecial cases, soft references are a terrible idea, and this snippet is a perfect example of a case when you should NOT use them. Why not for ( 1 .. 100 ) { push @buttons, $mw->Button->pack; } Now you have a nice list of 100 buttons in @buttons -- Lawrence Statton - [EMAIL PROTECT

Re: stats on partitions

2007-02-05 Thread Lawrence Statton XE2/N1GAK
004 /bin/df -- Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g Computer software consists of only two components: ones and zeros, in roughly equal proportions. All that is required is to place them into the correct order. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-m

Re: stats on partitions

2007-02-05 Thread Lawrence Statton XE2/N1GAK
http://search.cpan.org/search?query=disk+space+DF&mode=all -- Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g Computer software consists of only two components: ones and zeros, in roughly equal proportions. All that is required is to place them into the correct order. --

Re: Get summery of a jpeg file

2007-01-17 Thread Lawrence Statton XE2/N1GAK
> From [EMAIL PROTECTED] Wed Jan 17 01:14:35 2007 > Received: from localhost (localhost [127.0.0.1]) > by hummer.cluon.com (8.13.8/8.13.8) with ESMTP id l0H7CxiU007971 > for <[EMAIL PROTECTED]>; Wed, 17 Jan 2007 01:14:35 -0600 (CST) > Received: from cluon.com [209.135.140.13] > by

Re: Get summery of a jpeg file

2007-01-16 Thread Lawrence Statton XE2/N1GAK
lost as to which is the best for my seemingly simple needs -- does anyone here have a favorite and why?", it would have been far superior. -- Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g Computer software consists of only two components: ones and zeros, in roughly equal prop

Re: Get summery of a jpeg file

2007-01-16 Thread Lawrence Statton XE2/N1GAK
#x27;s complicated, and the documentation is hard to read, but Image Magick (which comes with perl bindings) can do anything with an image that can be done, including getting the info block out of a JPEG. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Lawrence Statton

Re: Mail Attachment

2007-01-16 Thread Lawrence Statton XE2/N1GAK
First -- your porgram is nowhere NEAR complete ... I see nowhere that $to_address, $from_address, etc are populated. Read the posting guidelines and try again. That being said, there are some glaring deficiencies that can be pointed out even without the complete program. > > my $picture=PATH O

Re: [OT?] Re: Which module for web graph?

2006-12-14 Thread Lawrence Statton XE2/N1GAK
g ads. I need a stiff drink. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g Computer software consists of only two components: ones and zeros, in roughly equal proportions. All that is required is to sort them into th

Re: reg exp continued need pulled from reference

2006-12-14 Thread Lawrence Statton XE2/N1GAK
Ahh, good catch -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: reg exp continued need pulled from reference

2006-12-13 Thread Lawrence Statton XE2/N1GAK
> --- Lawrence Statton XE2/N1GAK <[EMAIL PROTECTED]> > I am using Spreadsheet::WriteExcel to populate certain > columns which is working, but in column A for example > I am using the method write_col which requires a > reference, Not just "a reference" but an ARR

Re: reg exp

2006-12-12 Thread Lawrence Statton XE2/N1GAK
If you're dealing with variable length strings, separated by some kind of character, then regexp is the tool you want, not substr. This snippet will work so long as hostname and platformname are made up of \w ... if not, substitute in an appropriate character class. #!/usr/bin/perl use strict; u

Re: Perl create tcp connections

2006-12-12 Thread Lawrence Statton XE2/N1GAK
Take a step back -- what are you trying to accomplish? -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g Computer software consists of only two components: ones and zeros, in roughly equal proportions. All that is

Re: Perl create tcp connections

2006-12-11 Thread Lawrence Statton XE2/N1GAK
isn't someone listening. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g Computer software consists of only two components: ones and zeros, in roughly equal proportions. All that is required is to sort them into the correct order.

Re: Sorting from subroutine call

2006-12-02 Thread Lawrence Statton XE2/N1GAK
return $a->{$current_sort_field} cmp $b->{$current_sort_field}; } foreach $current_sort_field (qw/ color name texture /) { print "\n\nSorting by $current_sort_field\n"; foreach my $row (sort by_something values %$data_for ) { print "$row->{color} - $row->{

Re: Sorting from subroutine call

2006-12-02 Thread Lawrence Statton XE2/N1GAK
e_call @array; > > sub subroutine > { > $a <=> $b; > } > > > How could I do it? > perldoc -f sort. Look at the very first example. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g Comput

Re: goto return ?

2006-11-28 Thread Lawrence Statton XE2/N1GAK
return @_; } -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g Computer software consists of only two components: ones and zeros, in roughly equal proportions. All that is required is to sort them into the correct order. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional co

Re: Time::Local let me faint

2006-08-29 Thread Lawrence Statton XE1/N1GAK
Because SEPTEMBER only has thirty days. 0 - January; 1 - February; 2 - March; ... --L -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

re: hash lookup table

2006-08-28 Thread Lawrence Statton XE1/N1GAK
Trivial problem. What does $words *really* contain in your subrotuine words_to_num? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: scoping problem with hash

2006-06-15 Thread Lawrence Statton
Charles Clarkson wrote: > @{ %$hash_ref }{ keys %kv_pairs } = values %kv_pairs; You can excise a little of the snyactic sugar there @$hash_ref{keys %kv_pairs} = values %kv_pairs; -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Lawrence Statton - [EMAIL PROTEC

Re: Yet another OO question

2006-06-10 Thread Lawrence Statton
;color('red'); > $_->texture('crunchy') > } > Hrm ... a Clever Construction, indeed. Our local style guide bans the use of for without an explicit index variable , so that bit of cleverness would lead to the following silly code: for my $localfruit ($fruit) { $localfr

Re: modifying @INC permanently

2006-06-08 Thread Lawrence Statton
ipts have logic to push the same directory to @INC. It's > rather repetative. > You do not need logic to do that. It would seem better to use: use lib '/path/to/my/misplaced/perl-modules'; -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Lawre

Re: Yet another OO question

2006-06-08 Thread Lawrence Statton
e call - so it does increase the total knowledge of your program. My hitherto prefered answer is "It should return the object." Only because I (used to) like to chain method calls. I've since lost this bad habit. $fruit->name('apple')->color('red

Re: Simple loop question

2006-05-31 Thread Lawrence Statton
> > Get in the habit of using strict and warnings -- 'use warnings' is > > subtly different from 'perl -w' and you should start good habits > > early. Upgrade if you are using an ancient version of Perl that does > > not come with warnings. > > > So would it be a conflict to use both "-w" and "st

Re: Simple loop question

2006-05-31 Thread Lawrence Statton
> > #!/usr/bin/perl > use strict; > use warnings; > > our ($upper, $lower, $target) = ( 20, 1, 11 ); > D'oh! I really _meant_ to make those lexical instead of package variables - another good habit to get in early. my ($upper, $lower, $target) = (20,1,11); -- To unsubscribe, e-mail: [EMAIL

Re: Simple loop question

2006-05-31 Thread Lawrence Statton
> Hi list, > > Hope this is not too simple or a stupid question: > > I have a slight problem with a loop. It is a simple numbers guessing game. It > works fine, but when I run this script, it gives me "Too low" immediately aft > er > the prompt. What should I do to get the last "else" statement d

Re: Need information for Tcl/tk

2006-05-20 Thread Lawrence Statton
rving Perl programmers. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g Computer software consists of only two components: ones and zeros, in roughly equal proportions. All that is required is to sort them into the correct order. -- To unsubscribe, e-mail:

Re: Class::Struct: Can't access struct field elements

2006-04-11 Thread Lawrence Statton
> Though I'm making progress (thanks guys) I'm still having a problem > with dereferencing the struct elements. I've re-read the section on > References in Programming Perl and I thought what I was doing was > correct, but I can't print out the values correctly. Here's a > simplified version of wh

Re: How to use IP Address from VPN instead of Primary?

2006-04-05 Thread Lawrence Statton
> I'm using the LWP, HTML::Parser, HTTP::Request::Common and other packages > retrieve some infromation from some web sites which require I have a certain > IP address. I'm using a VPN to connect to this network. How can I tell perl > to use the secondary IP address aquired by means of the VPN inst

Re: only one of two hash keys

2006-04-04 Thread Lawrence Statton
nderstand what you meant. How 'bout Given a hash %hash with many keys ( qw / key1 key2 key3 keyn / ) how do I test that only one of the values $hash{key1} or $hash{key2} are defined? if ( exists $hash{key1} and exists $hash{key2} ) { warn "fail"; } else { warn "succ

Re: @array =to=> $array

2005-06-10 Thread Lawrence Statton
tly easier on the fingers version: %person = ( first_name => 'Lawrence', last_name => 'Statton', occupation => 'Perl Hacker', city => 'Guadalajara', country => 'Mexico' ); ## Here is the hash slice not

Re: @array =to=> $array

2005-06-10 Thread Lawrence Statton
bad data design. Not always, mind you -- but it should be a flashing yellow light meaning "am I doing something lame here?" > > > ## > > ## GETTING INTO THE PERL STATE OF MIND > > ## > > > > for my $person (@person) { > > print "Hello $person\n"; > > } > -- -- -- -- -- -- -- -- -- --

Re: @array =to=> $array

2005-06-09 Thread Lawrence Statton
n\n"; } Note that of the three techniques, the last is the only one that will work for all values of $[ (of course, anyone who sets $[ to any nonzero value deserves hot pokers in the eyes.) -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Lawrence Statton - [EMAIL PRO

Re: @array =to=> $array

2005-06-09 Thread Lawrence Statton
f the form $foo1, $foo2, $foo3 you should be using an array. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g Computer software consists of only two components: ones and zeros, in roughly equal proportions. All

  1   2   >