Re: defined{ness}

2009-03-17 Thread Dermot
2009/3/17 Chas. Owens : > On Tue, Mar 17, 2009 at 09:30, Dermot wrote: > snip >> if ($x{$x})  inspects the key's value, not simply the existence of a key? > snip > > Yes, but beware of autovivification (i.e. the creating of keys by > trying to look at their values).  

Re: class DBI postgres date time format

2009-03-17 Thread Dermot
2009/3/17 ken uhl : > How do I set up table class method to correctly format and write 'updated' >  column  date and time stamp to postgres? > > I have table entry object that contains this - to inflate and deflate : > > I think I need to add  "has_timestamp" > . > >    22 __PACKAGE__->table('d

Re: perl

2009-03-19 Thread Dermot
2009/3/19 Sharan Basappa : > I have started going through TK documents. The initial sections seem > to concentrate more on adding different options to screen and do some > background action based on user input. My requirement is not so much > on user control but more on the visual display side (par

LWP - HTTP::Request::Common construction

2009-03-19 Thread Dermot
Hi, I can't see what I am doing wrong when I construct a request with HTTP::Request::Common. I am trying to use the Form-based File-Upload feature as described at http://search.cpan.org/~gaas/libwww-perl-5.825/lib/HTTP/Request/Common.pm Here my code fragment: use 'Carp'; BEGIN { use_ok( 'LWP:

Re: busy_handler in sqlite

2009-03-19 Thread Dermot
2009/3/19 marcos rebelo : > Hi all > > I'm a Perl programmer (not a complete beginer) using SQLite. > > I want to retry to execute every command automatically, until the DB > is not locked. In C seems that I need to set the busy_handler. > > How do I do this with DBD in Perl? > > Thanks for any hel

Re: LWP - HTTP::Request::Common construction

2009-03-19 Thread Dermot
2009/3/19 Dermot : > Hi, > > I can't see what I am doing wrong when I construct a request with > HTTP::Request::Common. I am trying to use the Form-based File-Upload > feature as described at > > http://search.cpan.org/~gaas/libwww-perl-5.825/lib/HTTP/Request/Common.pm &

bit patterns and bitwise operations

2009-03-27 Thread Dermot
Hi All, I have been trying to write this email for a day or two but the content keeps shifting as my understanding of the problem develops. I have encountered a bit of code that I am struggling to understand completely. The code is for dealing with database fields that are bigint(20) type. | all

Re: "Programming Perl" vs perldoc

2009-04-09 Thread Dermot
2009/4/8 Richard Hobson : > On Wed, 08 Apr 2009 08:50 -0400, "Chas. Owens" > wrote: Amazon US has "Intermediate Perl" new for $25, > while Amazon UK has it for $46, excluding postage. It's £30.99 and postage is free if you accept standard 2nd class delivery. http://www.amazon.co.uk/Intermediat

Re: reading files c vs perl

2009-04-15 Thread Dermot
2009/4/14 Chas. Owens : > On Tue, Apr 14, 2009 at 11:49, Rick wrote: >> is it true that perl will be just as fast as c for reading files ? >> >> for example >> > cow...@amans:~$ time cat /usr/share/dict/words | perl wc.pl > my $count = 0; > > $/ = \4096; > while (<>) { >        $count += tr/\n//

set defaults as hash - once

2009-04-20 Thread Dermot
Hi, I am trying to initiate a hash once when the package is loaded (via modperl). I don't want to make repeated DB queries for this data so I'd like to populate the hash when my daemon starts and not again until it's reloaded/started. I thought that I could say somethign like, "if %defaults, retur

Re: set defaults as hash - once

2009-04-20 Thread Dermot
2009/4/20 Chas. Owens : > On Mon, Apr 20, 2009 at 11:21, Dermot wrote: ... >> I thought that I could say somethign >> like, "if %defaults, return %defaults else populate %defaults and >> return". >> >> Here's the error I am getting: >>

Re: set defaults as hash - once

2009-04-20 Thread Dermot
2009/4/20 Chas. Owens : > On Mon, Apr 20, 2009 at 12:26, Dermot wrote: >> 2009/4/20 Chas. Owens : >>> On Mon, Apr 20, 2009 at 11:21, Dermot wrote: >> ... > snip > > I would avoid the do {...} and just muck with %defaults directly (as I > did in the exam

Re: package variables

2009-04-28 Thread Dermot
> If no import list is supplied, all possible restrictions are assumed, that > why it's working fine Thanx all. I suspected as much. It's not a practise I'd use personally. I'm sorry, I don't understand what you mean by "import list" here. Dp. -- To unsubscribe, e-mail: beginners-unsubscr...@

package variables

2009-04-28 Thread Dermot
Hi, I saw some code like this today: !/bin/perl -w package My::Package; use strict; ... %My::Package::somehash = ( keyone => 'val', keytwo => 'val2'); The My::Package::somehash isn't declared as with `my` yet the package loads without error or warnings. Is this because the hash is given as

Re: Help with LWP

2009-05-13 Thread Dermot
2009/5/13 Jim Gibson : > On 5/13/09 Wed  May 13, 2009  2:17 PM, "ANJAN PURKAYASTHA" > scribbled: > >> Hi, >> >> if ($response->is_success) { >>      print $response->content()."\n";  # or whatever >>  } >>  else { >>      die $response->status_line; >>  } >> >> All this script returns is the NCBI

Re: XML manipulation

2009-05-19 Thread Dermot
2009/5/19 : > Hi All, Hi, > I have a scenario where I should edit an xml file. I should change an > element's value based on another element's value. > > I should change > > > >             >               RG0001_Down111 >               >               Enabled > > > > to > > > >          

Re: perl on windows

2009-05-19 Thread Dermot
2009/5/19 Sharan Basappa : > Actually there was no exe. I only got a zip folder and uncompressed. I > am clueless what to do after that... Click on the file that says 'Win32 Perl Wiki' and follow the instructions at http://win32.perl.org/wiki/index.php?title=Main_Page#Installing_Perl_on_Windows_

Re: perl on windows

2009-05-20 Thread Dermot
2009/5/19 Dr.Ruud : > > All I see there is a link named > "Download strawberry-perl-5.10.0-final.exe (17.0 MB)" > so I don't understand how you got the .zip. > Other releases (including zip) can be found here: http://strawberryperl.com/releases.html but I imagine the exe would be best in this c

Re: need help on perl code

2009-06-16 Thread Dermot
2009/6/16 Irfan Sayed : > Hi All, Hello, > I have perl script like this : > > use strict; > use warnings; > use Cwd; > my $chver; > my $fina; > &chversion(); &chversion() should be kept as simply chversion(); > sub chversion { >   print STDERR "Current directory is " . cwd() . "\n"; >   print

Re: Need help with Mail::Sender

2009-06-26 Thread Dermot
2009/6/26 Jenda Krynicky : This is what > worked for me in Pegasus Mail: It's good to know there are still a few pmail users out there :) -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Understanding recursion

2009-07-10 Thread Dermot
Hi, I was reading Higher Order Perl[1] last night and, dishearteningly, got stuck on chapter one. Mark Dominus offers the following as a  binary string conversion example of how recursion can work. use strict; use warnings; my $bstr = binary(37); print "$bstr\n";                 # prints 10010

Re: Understanding recursion

2009-07-10 Thread Dermot
2009/7/10 Shawn H. Corey : > On Fri, 2009-07-10 at 09:26 +0100, Dermot wrote: >> The algorithm works perfectly but my understanding of it's workings is amiss. >> >> When I look at this I see $E initialised and then concatenate with the >> the modulus of >> 37

Re: Understanding recursion

2009-07-10 Thread Dermot
2009/7/10 Telemachus : > On Fri Jul 10 2009 @  9:26, Dermot wrote: >> The algorithm works perfectly but my understanding of it's workings is amiss. >> >> When I look at this I see $E initialised and then concatenate with the >> the modulus of > > It he

Re: Making functions more reusable

2009-07-13 Thread Dermot
2009/7/11 Steve Bertrand : > I have numerous methods such as the following. They all perform the same > basic function based on the parameter passed in ($name, $key or nothing). > > I've recently moved out the actual data definition (hash) into a > different 'private' function in order to make thin

Re: recommendations for web/database applications

2009-07-28 Thread Dermot
2009/7/28 David Christensen : > Perl Beginners: > > I am thinking about a Perl web/ database application for political > organizing and campaigns -- generating precinct walk lists, generating > phone banking lists, tracking contacts, etc..  I am using Debian > GNU/Linux 5 with Apache 2.2, mod_perl

Subroutine foo redefined a bar

2009-07-28 Thread Dermot
Hi, I noticed this error appearing when I stop/started my httpd server recently (yes this is modperl 1 code). This offending code reads a like this: package Some::Pack; .. .. sub addItemsToBasket { my ($bid, $items) = @_; foreach my $i (@items) { addItemToBasket($bid, $i

Re: Subroutine foo redefined a bar

2009-07-28 Thread Dermot
2009/7/28 John W. Krahn : Thanx for gettig back to me. > Which error?  Copy and paste the error message you are receiving. Opps sorry. Here you are. Every time I start the httpd I get Processing config file: /etc/apache-modperl/conf.d/dev_vhost.conf Subroutine addItemsToBasket redefined at /ex

Re: Subroutine foo redefined a bar

2009-07-28 Thread Dermot
2009/7/28 John W. Krahn : > Dermot wrote: >> >> 2009/7/28 John W. Krahn : >> >> Thanx for gettig back to me. >> >>> Which error?  Copy and paste the error message you are receiving. >> >> Opps sorry. Here you are. Every time I start the httpd

Re: Subroutine foo redefined a bar

2009-07-29 Thread Dermot
2009/7/29 John W. Krahn : > Dermot wrote: >> >> 2009/7/28 John W. Krahn : >>> >>> Dermot wrote: >>>> >>>> 2009/7/28 John W. Krahn : >>>> >>>> Thanx for gettig back to me. >>>> >>>>> Which

Re: Subroutine foo redefined a bar

2009-07-29 Thread Dermot
2009/7/29 Shawn H. Corey : > Chas. Owens wrote: >> >> On Wed, Jul 29, 2009 at 04:37, Dermot wrote: >> snip >>> >>> I'll grab myself a version of Scalar::Utils and have a play. >> >> snip >> >> If your version of Perl is 5.8.0 or

Re: Perl and HTML

2009-07-31 Thread Dermot
2009/7/31 Tony Esposito : > I am using Perl 5.8.x, Windows XP SP2 and Novell GroupWise email client. > I have written a program to send an email which contains HTML.  Issue is that > in the email body the 'body' shows up as HTML text and GroupWise has the > choice to read it in HTML grayed-out (f

Re: file uploader

2009-08-02 Thread Dermot
2009/8/2 Octavian Râşniţă : > From: "Shawn H. Corey" >> >> Octavian Râşniţă wrote: >>> >>> Hi, >>> >>> Due to the file size limitations of the common browsers like IE or >>> Firefox, I wanted to create a file uploader that doesn't use a browser, but >>> just posts a file to a program on a server.

Re: Purpose of $$ in subroutine

2009-08-05 Thread Dermot
2009/8/5 Chas. Owens : > On Tue, Aug 4, 2009 at 23:07, Dave Tang wrote: >> On Wed, 05 Aug 2009 12:55:22 +1000, Chas. Owens >> wrote: >> >> snip Here's someone's recent experience of encountering prototypes: http://perlhacks.com/2009/06/what-is-wrong-with-this-picture.php Good luck, Dp. -- To

Re: 'Join' query

2009-08-07 Thread Dermot
2009/8/7 jet speed : > Hi, > > I would like to join the $abc with ':'  the final desired output 1:2:3:4:5 > > #!/usr/bin/perl > > use strict; > use warnings; > > my $abc = "1 2 3 4 5"; > my $out = join ':', $abc; > print "$out"; > join works on arrays (LIST). You feeding it a scalar. @abc = qw/1

Re: AW: CGI and persistent data (without Storable)

2009-08-28 Thread Dermot
2009/8/28 Steve Bertrand : > Thomas Bätzler wrote: >> Steve Bertrand asked: >>> I'm writing a web interface using CGI::Application for a project that >>> houses numerous methods within a dozen modules. >>> >>> One particular process displays a template to the user with passed in >>> data, and then

!! notation

2009-09-09 Thread Dermot
Hi, I saw this notation today: !! $class->method; or as an assignment: my $var = !! $class->method; I can't find a definition for it in perlsyn or perlop. I don't think it's restricted to classes. I suspect this is boolean but I'd like to know. Any pointers? Thanx, Dp. -- To unsubscribe, e-

Re: Don't understand the errors

2009-10-18 Thread Dermot
2009/10/18 Harry Putnam : Hi, I can't say I am absolutely sure what the error is referring to but I can see where you might begin to look for clues. > I'm not sure what these errors are telling me. > > The script is supposed to remove dups from .bash_history but not > operate on the last 12 line

Re: Don't understand the errors

2009-10-19 Thread Dermot
2009/10/19 Harry Putnam : > >>> use File::Copy; > > Dermot commented: >> It might be best to put this at the top of your script with all the >> other loadable modules your using. > > Harry asks: > Do you think it would make a difference in how the script be

Re: Problem with PDF::API2::Lite module

2009-10-22 Thread Dermot
2009/10/22 Dermot : > 2009/10/22 ANJAN PURKAYASTHA : >> Hi All, >> I wrote a short script to test the PDF::API2::Lite module. I work on a Mac >> OSX. >> Here is the script: >> #! /usr/bin/perl >> >> use strict; >> use warnings; >> use PDF::

Re: About the hash case insensitive ~~~

2009-10-27 Thread Dermot
2009/10/27 Majian : > Hello,all: > I had a question about the perl hash case insensitive . > > And I had  this script : > == > #!/usr/bin/perl > use warnings; > %courses = ( >             "2CPR2B"    => "C Language", >             "1UNX1B"    => "Intro to Uni

Re: Regex to array woes

2009-11-02 Thread Dermot
2009/11/2 Brent Clark : > Hiya > > I was hoping that someone would be kind to help me. > > I have a string like so : > > Haresources : 10.203.4.5, Interfaces : 10.203.4.5 10.203.4.7 > > Im trying to get the ip's after Interfaces into an array, but for the likes > of me, im just not getting it right

Re: Is Larry Wall member of this mailing list

2009-11-04 Thread Dermot
2009/11/4 Parag Kalra : > Hey Folks, > > Its good to see veterans like - 'Randal L. Schwartz', 'Brian D Foy' replying > on this mailing list. > > So just out of curiosity wanted to if Larry Wall is also member of this > mailing list. > > I know this is not a query to ask here but my growing interes

Re: Is Larry Wall member of this mailing list

2009-11-04 Thread Dermot
2009/11/4 Parag Kalra : > Hey Folks, > > Its good to see veterans like - 'Randal L. Schwartz', 'Brian D Foy' replying > on this mailing list. > > So just out of curiosity wanted to if Larry Wall is also member of this > mailing list. > > I know this is not a query to ask here but my growing interes

Re: using xcopy in windows xp

2009-11-04 Thread Dermot
2009/11/4 Shawn H Corey : > axr0284 wrote: >> Hi, >>  I was wondering if anybody can tell me what I am doing wrong. I am >> trying to use xcopy: >> system("XCOPY", "KCPSM3.EXE", $s_tempLocation, "/R /Y"); >> >> $s_tempLocation contains "c:\temp" >> >> When I run the script, I get the following erro

Re: Broken perl & perlivp

2009-11-06 Thread Dermot
2009/11/5 Greg Eldridge : > Hello > > First, the increase in traffic on this list has been amazingly > educational. > > I am updating to 5.10.1 on Linux (2.6.27.25-78.2.56.fc9.i686). Using > perlivp I found that I'm in need of help. > > My update command was: "./Configure -des && make test && make

Re: Net::FTP fails when invoked from browser

2009-11-08 Thread Dermot
2009/11/7 boman : > Have a simple script to FTP all files in one dir to a Solaris box. > Script runs fine when invoked from command line. However, when invoked > from browser (simple html form with one button that calls the .pl > script), only some files get FTPd. The process seems to stall, then >

Re: How to catch the DBI module error message

2009-11-09 Thread Dermot
2009/11/9 Parag Kalra : > Hello All, Hello, > This is my first post here. Are you sure about that? I have a vague recollection of a question you asked about "Optimizing File handling operations" then of course there was the "My name is Larry Wall" for which I apologise :) > I am executing a Pe

splice without the remove

2009-11-09 Thread Dermot
Hi, I just spent 20mins scratching my head because I didn't read the docs very closely concerning splice. I had assumed it left the array intact, its doesn't. I was hoping for a function more akin to substr where the return would be the offset -> length of the array but the value it was working on

Re: splice without the remove

2009-11-09 Thread Dermot
2009/11/9 Shawn H Corey : ... > use Data::Dumper; > > # Make Data::Dumper pretty > $Data::Dumper::Sortkeys = 1; > $Data::Dumper::Indent   = 1; > > # Set maximum depth for Data::Dumper, zero means unlimited > $Data::Dumper::Maxdepth = 0; > > my @array = (1, 4, 6, 9, 2); > my @list = @array[ 1 .. 3 ]

Fwd: Perl+webservice

2009-11-12 Thread Dermot
2009/11/11 kartik saxena : > I am running a local StockQuoteService , > http://localhost:8080/axis2/services/StockQuoteService?wsdl > > $stockprice=SOAP::Lite ->service('http://localhost:8080/axis2/service/ > StockQuoteService?wsdl') ->getPrice('IBM'); print Dumper($stockprice); > The result retur

Re: Perl+webservice

2009-11-12 Thread Dermot
2009/11/12 kartik saxena : > Hi, > I am using the Trace and I got this reply from the java service: > > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";> xmlns:wsa="http://www.w3.org/2005/08/addressing";>http://www.w3.org/2005/08/addressing/soap/faultVersionMismatchOnly > SOAP 1.1 or SOA

Re: redirecting to a file in perl

2009-11-13 Thread Dermot
2009/11/13 Subhashini : > i am trying to execute unix commands using perl.I am doing this using *System > command.* > Could i know how i could r*edirect the output of that command onto a log > file either by using a perl script or may be using command line arguments.* > Please do help me. See perl

Re: redirecting to a file in perl

2009-11-13 Thread Dermot
2009/11/13 Subhashini : > could you help me resolve this problem I just did. Have a look at those docs and examples. They are pretty clear. They show you exactly how to redirect to a file or STDERR. [Quote] 1. system("prog args 1>tmpfile 2>&1"); 2. system("prog args 2>&1 1>tmpfile"); [/Quo

Re: redirecting to a file in perl

2009-11-13 Thread Dermot
2009/11/13 Subhashini : > hello dermot, Hello You should direct you replies to the mailing list. There are far better programmers out there then me. > I am doing a coversion on french to english words.I have installed the > dictionary and i could use it on my command prompt

Re: redirecting to a file in perl

2009-11-13 Thread Dermot
2009/11/13 Subhashini : > i did try it but didn't work.. Did try what? Can you please show us what you've tried. Post the updated version. And can you please reply to the mailing list. There will be others how might find the answer to their problem by searching the archives and seeing your mail. D

Re: redirecting to a file in perl

2009-11-13 Thread Dermot
2009/11/13 Subhashini : > > This is the code that i have written > > > #!/usr/bin/perl > print "ENTER THE WORD IN ENGLISH"; > print "\n"; > $english=; > print "word ="; > print "$english"; > print "\n"; > print "***   FRENCH -TO - ENGLISH - > TRANSLATION    *

Re: mkdir in the mounted partition,please help me ,thanks

2009-11-17 Thread Dermot
2009/11/17 gaochong : > #!/usr/bin/perl -w > > > > #Auther:gaochong > > > > use strict; > > > > my @list = (3 .. 9); > > my @FA=("FA0001".."FA2000"); > > sub mk_fa { > >        my ($f) = @_; > >        foreach my $p (@list) { > >                mkdir "/data$p/NRU/$f",0755 or warn "mkdir /da

Re: 答复: mkdir in the mounted partition,please help me,thanks

2009-11-17 Thread Dermot
2009/11/17 gaochong : > but I have uses perl -w。 > any other problem ? Did you receive and error message? Dp. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Emailing all pdf files in a directory

2009-11-17 Thread Dermot
2009/11/16 Tiffany : > Hello, Hi, > I am not very familiar with Perl, but I am trying to use it to email > all files within a directory that have a .pdf extension using the anex > command within the Mail::SendEasy module.  I have created an array > with my filenames using @files = <*.pdf>; but I

Re: Looking for advise on storring a complex array

2009-11-18 Thread Dermot
2009/11/18 Rob Coops : > On Mon, Nov 16, 2009 at 10:09 PM, Rene Schickbauer < > rene.schickba...@magnapowertrain.com> wrote: > >> Rob Coops wrote: > > Thank you for the advise, I'll certainly be using a DB should this tool ever > get upgraded to a web based one. You'd be hard pressed to find a *ni

Re: Regular expressions question

2009-11-18 Thread Dermot
2009/11/17 mangled...@yahoo.com : > Hi, Hello, > Can anyone tell me hoq to write a regular expression which matches > anything _except_ a litteral string ? > > For instance, I want to match any line which does not begin with > Nomatch.  So in the following : > > Line1 > Line2 > Nomatch

Re: Regex to get last 3 digits of a number.

2009-11-23 Thread Dermot
2009/11/23 Dave Tang : > On Mon, 23 Nov 2009 23:14:51 +1000, Shawn H Corey > > Hi Shawn et al., > > I am also intrigued by the \z anchor. I had a look at perldoc perlreref and > found > > \z  Match absolute string end > > My question is what is the difference between \z and $? And when should I >

Re: Regex to get last 3 digits of a number.

2009-11-24 Thread Dermot
2009/11/23 Dave Tang : > On Tue, 24 Nov 2009 09:39:09 +1000, Dermot wrote: > >> 2009/11/23 Dave Tang : >>> >>> On Mon, 23 Nov 2009 23:14:51 +1000, Shawn H Corey >>> >>> Hi Shawn et al., >>> >>> I am also intrigued by the \z anch

Re: return {}->{'name'};

2009-11-24 Thread Dermot
2009/11/18 Randal L. Schwartz : > > I prefer a pattern that looks more like this: > > sub expensive_to_calculate { > >  my $self = shift; >  my $input = shift; # cache on this scalar > >  our %cache_for_expensive_to_calculate; >  return $cache_for_expensive_to_calculate{$input} ||= do { >    expens

Re: How to toggle a variable with each iteration?

2009-11-25 Thread Dermot
2009/11/25 kusuma ramaswamy : > Hello, I am new to perl. I would like to know how to toggle a variable with > each iteration in a loop ?? Hi, I'm not entirely sure that I understand your requirements but this might get you started. You want to scope your variables with the keyword `my`, so #!/p

Re: Code issue with perl5.10

2009-11-25 Thread Dermot
2009/11/25 Steve Bertrand : >> >> ${$self->{__pb_template_list}}[...@{$self->{__PB__TEMPLATE_LIST}}}]->param( >> $param, $value ); >> >> As I understand it, $# has been deprecated in 5.10. Ouch! Really. That's a shame. Can someone please >> help me understand the above line of code? What does $#

Re: Separating DB operations out of program code

2009-11-26 Thread Dermot
2009/11/26 Scott Pham : > Have you looked at DBIx::Class? > I'd 2nd that. DBIx is the way forward. You should be looking to stop writing SQL statements and moving towards ORM. Try the example at http://search.cpan.org/~frew/DBIx-Class-0.08114/lib/DBIx/Class/Manual/Example.pod Good luck, Dp. --

Re: calc time elapsed in days

2009-11-27 Thread Dermot
2009/11/27 Rob Coops : > On Fri, Nov 27, 2009 at 5:43 AM, raphael() wrote: >> >> HOW CAN I COUNT ELAPSED DAYS ? >> >> I tried in localtime() days value like >> >> my @array_date = localtime(); >> my $current_dayofyear = @array_date[7]; >> >> >> But this would break on New year as "$current_dayofye

Re: a simple question about the line

2009-11-27 Thread Dermot
2009/11/27 John W. Krahn : > Hello, > > $ echo "12 > 23 > 34 > 45 > 56 > 67 > 78" | perl -lpe'$\=--$|?$,:$/' > 1223 > 3445 > 5667 > 78 For the benefit of this Luddite, please explain? Dp. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@

Re: Separating DB operations out of program code

2009-11-28 Thread Dermot
2009/11/27 Steve Bertrand : > Dermot wrote: >> 2009/11/26 Scott Pham : >>> Have you looked at DBIx::Class? >>> >> >> I'd 2nd that. DBIx is the way forward. You should be looking to stop >> writing SQL statements and moving towards ORM. Try the exa

Re: PRINT LAST ENTRY IN A FILE

2009-11-28 Thread Dermot
2009/11/28 raphael() : > Hi, Hi, > # records.txt > 25.11.2009 NAME_0 > 15.12.2006 NAME_3 > 20.10.2007 NAME_1 > 01.01.2008 NAME_3    <-- This whole line should be printed. > 10.10.2008 NAME_4 > > Using while in a while loop matching ( m// ) I get all the entries > havin

Re: PRINT LAST ENTRY IN A FILE

2009-11-28 Thread Dermot
2009/11/28 raphael() : >> 2009/11/28 raphael() : >> > Hi, >> Hi, >> >> > # records.txt >> > 25.11.2009 NAME_0 >> > 15.12.2006 NAME_3 >> > 20.10.2007 NAME_1 >> > 01.01.2008 NAME_3    <-- This whole line should be printed. >> > 10.10.2008 NAME_4 >> > >> > Using while in a whi

Re: die unless match is successful

2009-11-29 Thread Dermot
2009/11/29 raphael() : > Hi, > > I want the below if loop to end if it cannot find any match & print the die > message. > However it just exit without hitting my "die" > > As you can see in the code below I have tried many foolish ways to make the > script say > that it cannot find the number searc

Re: return {}->{'name'};

2009-11-30 Thread Dermot
2009/11/24 Randal L. Schwartz : >>>>>> "Dermot" == Dermot   writes: > > > ... > > Dermot> I guess the question is: Will the declaration of our %cache within a > Dermot> function-orientated sub-routine render it always uninitialized? > > I b

Re: ERROR: malformed header

2009-12-02 Thread Dermot
2009/12/2 Rene Schickbauer : > Raheel Hassan wrote: >> >> HI, >> >> I have an error in opening one of my perl script, could any one tell me >> where i look for resolving this problem. This error i looked in the apache >> error logs. Thanks in advance. >> >> * "malformed header from script. Bad head

Re: About the uninstall the new perl version

2009-12-02 Thread Dermot
2009/12/2 Majian : > Hi, guys: > >  I have a problem about the perl uninstall , my laptop's system is CentOS > 5.3 x86_64, and the default perl version is perl -5.8.8; > >     I installed the newer version called perl -5.11.1by the tar.gz package > , but now I don't want it ~ > >        In other wo

Re: return {}->{'name'};

2009-12-03 Thread Dermot
2009/12/3 Peter Scott : > On Mon, 30 Nov 2009 14:36:44 +0000, Dermot wrote: Does it have a name? > > It's called the Orcish Maneuver ("or-cache").  See: "Effective Perl > Programming", Hall with Schwartz. Thank you. Interesting there's a edition publish

Re: learning perl scripting

2009-12-06 Thread Dermot
2009/12/6 Agnello George : > Hi Welcome > i am basically a  a system administrator, and i have just joined this new > company where my entire team are a group pf developers + system admins and i > am the only system admin with out programming knowledge . i know a little of > shell scripting from

Re: Email does not send attachment ...

2009-12-09 Thread Dermot
2009/12/9 Robert H : > On 12/8/09 3:56 PM, Tony Esposito wrote: >> >> Hello, Hi >>   use MIME::Lite; >>  use Net::SMTP; >> >>  unless (-e 'C:/my_file.log'&&  -s 'C:/my_file.log' ) { print "file not >> found\n"; } >> >>   my $msg = MIME::Lite->new ( >>     From =>  'my_em...@yahoo.com', >>     To =

Re: Geeky way to wish Happy Birthday through Perl

2010-01-18 Thread Dermot
2010/1/17 Parag Kalra : >>>So common folks give me some ideas. > > I meant - Come on Folks :P > > Cheers, > Parag > > > > > On Sun, Jan 17, 2010 at 11:34 PM, Parag Kalra wrote: > >> Hello All, >> >> I am looking for a geeky way to wish someone on his Birthday with the help >> of Perl. >> >> Condit

Re: PERL binary conversion

2010-01-18 Thread Dermot
2010/1/18 Shan : > > Hi All, > > > How to install following module.or How to install following module in my > system.I'm working in WINDOWS NT. > Convert::Binary::C;Thanks and Regards,Shan Hi Shan, What Perl have you got installed? ActiveState's or Strawberry's? They will have their own means of

Re: PERL binary conversion

2010-01-18 Thread Dermot
2010/1/18 Shan : > Thank u for your quick reply. > > > Thanks, > Shan > > - Original Message - From: "Dermot" > >> 2010/1/18 Shan : >>> >>> Hi All, >>> >>> >>> How to install following module.or Ho

Re: hash of Arrays

2010-01-18 Thread Dermot
2010/1/17 Johnson, Reginald (GTS) : > I am trying to place the date of each day of the week for each month > that has 5 weeks into a hash. For instance my hash key 'Monday' would > point to an array that has all the dates where Monday is in the fifth > week of the month. > I've got that part going.

Re: PERL binary conversion

2010-01-19 Thread Dermot
2010/1/19 Shan : > - Original Message - From: "Dermot" > To: "Perl Beginners" > Sent: Monday, January 18, 2010 5:42 PM > Subject: Re: PERL binary conversion >> 2010/1/18 Shan : >>> >>> Thank u for your quick reply. >>>>

Re: Searching First Array in Second Array

2010-01-19 Thread Dermot
2010/1/19 Parag Kalra : > Hello All, > > I have 2 arrays. I have written a script that searches each and every value > of first array in the second array. Each & every value of Source Array > should occur only once in the target array but it can occur anywhere. > > If any of the source value doesn'

Re: LWP error returned

2010-02-10 Thread Dermot
On 10 February 2010 15:47, Mike Blezien wrote: > Hello, > > I've run into an error while using the LWP module which I haven't come > accross before and was wondering what is means. This is the coding I'm > using: > > -

Re: LWP error returned

2010-02-10 Thread Dermot
On 10 February 2010 17:01, Mike Blezien wrote: > > - Original Message - From: "Dermot" > To: "Perl List" > Sent: Wednesday, February 10, 2010 10:14 AM > Subject: Re: LWP error returned > > > On 10 February 2010 15:47, Mike Blezien wrote: >

Re: Dereferencing hash with array value

2010-02-13 Thread Dermot
On 13 February 2010 06:42, Owen wrote: > The program below works, but I don't believe I have to make the > reference  #  my $svgs = \...@svgs;     to get it into the hash; > > I think I should be able to do something like > >  $folders{$folder} = @svgs; >  print "$folders{Ztyx}->[3]\n"; You want

Re: Lingua::Stem 0.83 module installation problem

2010-03-16 Thread Dermot
On 16 March 2010 00:29, Doug Cacialli wrote: > Hello list, > > Building Lingua-Stem > Can't locate Lingua/Stem.pm in @INC (@INC contains: > C:/strawberry/perl/lib C:strawberry/perl/site/lib > c:\strawberry\perl\vendor\lib .) at lib/Lingua/test.pl line 2. > BEGIN failed--compilation aborted at lib

Re: Lingua::Stem 0.83 module installation problem

2010-03-17 Thread Dermot
On 17 March 2010 02:13, Doug Cacialli wrote: > On Tue, Mar 16, 2010 at 4:36 AM, Dermot wrote: >> On 16 March 2010 00:29, Doug Cacialli wrote: >>> Hello list, >> >>> >>> Building Lingua-Stem >>> Can't locate Lingua/Stem.pm in @INC (@INC con

Re: Perl Reference Books.

2010-03-22 Thread Dermot
On 22 March 2010 15:31, wrote: > Hi, I am a new to Perl programming, please can anyone advice me right book to > understand Perl. Hello and Welcome, > Thanks, > Prasad Prabhakara > Infrastructure Applications > Cell:480-889-4171 > Phone:83-6041 If you checkout the footer that it appened to yo

Re: Ternary operator: Am I missing something?

2010-03-29 Thread Dermot
On 29 March 2010 14:02, Jeff Soules wrote: > Hi all, Hiya, > Am I missing something?  I have the following chunks of code: > > EX 1: >    if ($foo == 1){ >        $bar = 0; >    }else{ >        $bar = 1; >    } > > EX 2: >    ($foo == 1) ? >        $bar = 0 : >        $bar = 1; > > These are lo

Re: [Was XS linker]

2010-04-08 Thread Dermot
On 8 April 2010 18:51, Mike McClain wrote: >> >> Current list volume is a fraction of what it has been. > > Amen and it seems a shame to me. > >> I'm simply suggesting that your idea of what is welcome here is more >> narrow than has traditionally been the case.  And in the end it doesn't >> reall

Re: Precision laser printing

2010-04-21 Thread Dermot
On 21 April 2010 04:10, keithvb wrote: > >  Hi, > > I need to create a grid, 24 cols, 16 rows on 4.5 cm centers > on an HP laser printer. Some of the cells will be filled, some empty. > Is there a way to do this in Perl? You going to have to break this project down. The actual document will need

Re: Need help to resove..... ExtUtils-Makemaker comilationS

2010-04-23 Thread Dermot
On 23 April 2010 17:04, Raheel Hassan wrote: > Hi Shlomi and Owen, > On Thu, Apr 22, 2010 at 5:37 PM, Shlomi Fish wrote: > >>2.6.27.24-2 is the kernel version (which is kinda old - I'm using > 2.6.33.2). I >>need the Mandriva version - please do: >>[shell] >>shlomi:~$ cat /etc/mandriva-release >>

Re: Too many arguments for OneTickUtil::getFilesFromDir at G:\workspace1\scripts\fooPackage.pl line 4, near "$pattern)"

2010-04-28 Thread Dermot
On 27 April 2010 15:39, dbtouch wrote: > Hi, Perl Folks Hello. > I am getting error "Too many arguments for > OneTickUtil::getFilesFromDir at G:\workspace1\scripts\fooPackage.pl > line 4, near "$pattern)" when running a small script calling a package > routine. Could you give some ideas on what

Re: perl setuid/suid and "use MODULE"

2010-04-28 Thread Dermot
On 28 April 2010 09:45, David Lee wrote: > Briefly: Hi, Unfortunately I can't offer you any inspired way to open that port. > I have tried to put as much as reasonably possible of the application into > local CPAN-like modules, with just the initial C wrapper and small perl > script outside th

Re: Still pondering working with hashs

2010-05-04 Thread Dermot
On 3 May 2010 19:47, Dr.Ruud wrote: > Harry Putnam wrote: > >> Yes, files that exist on multiple paths, but there are also >> many matched names that are not actually the same file. > > Then use md5, or a similar tool. Seconded. If you want to find duplicate files you will need to use MD5 or a S

Re: Inverting a hash

2010-05-09 Thread Dermot
On 9 May 2010 14:26, Harry Putnam wrote: > I have an example from Shawn C. from another thread, presented here > out of context.  The code does just what he meant it to do. > It inverts a hash. > > I'm trying to understand what is going on inside the sub function > `invert()'. > > ---        -

DBI under SOAP/mod_perl

2010-07-18 Thread Dermot
Hello All, (This is perl, v5.8.8). Sorry if this is a bit specialised (EG not v. beginner) but I'm getting rather frustrated and could use some help. I have a strange issue with a DBI/DBD::SQLite. I have a class that creates an instance of DBI, EG: package Foo; use strict; use warnings; use DB

  1   2   3   4   >