Re: Regex To get the Job Number and Corresponding state

2025-02-25 Thread Dermot
search.`/m`. I think we'd need to see more of the data to help further. Dermot On Tue, 25 Feb 2025 at 17:15, Asad wrote: > The problem with grep is that line numbers may change so even if i do grep > -E SUCCEEDED|"\ "ZDM_SETUP_TGT\"" -B5 , it may not alway 5 line

Re: help with making an sftp connection

2023-04-17 Thread Dermot
-v -o PreferredAuthentications=password -o PasswordAuthentication=yes -o BatchMode=yes ) ] ) or $sftp->error; The clue to what is going wrong will be in the output from ssh. Thanks, Dermot On Mon, 17 Apr 2023 at 10:13, Brent Wood vi

Re: Virtualmin and Webmin web hosting control panel are written in Perl 5

2022-08-03 Thread Dermot
++Kang-min Liu It looks like you can get (paid) support [1] for Virtualmin so if it's not practical for you to take on the entire task, you might consider that route. [1] https://www.virtualmin.com/documentation/system/support/ On Mon, 1 Aug 2022 at 08:27, Turritopsis Dohrnii Teo En Ming < tdtem

Re: What is the mean of the following syntax?

2022-08-03 Thread Dermot
that the Perl Foundation has invested heavily in, and perhaps, not describe this beautiful, powerful and expressive language as very tricky. Apologies for the mini rant, Dermot [1] https://www.oreilly.com/library/view/learning-perl-6th/9781449311063/ [2] https://perldoc.perl.org/perlretut

Re: No decode delegate for this image format `PNG'

2022-01-26 Thread Dermot
`convert --version` should display a list of delegates known to imagemagick. What does your say? On Tue, 25 Jan 2022 at 16:35, William Torrez Corea wrote: > I write a code but the result I expected is wrong. > > #!/usr/local/bin/perl >> use Image::Magick; >> >> # The script reads three images, c

Re: controlling Firefox using Perl

2021-03-12 Thread Dermot
In the past I have opted to use Webdriver::Tiny. However I've only ever used it with Chromium browser but the documentation says it can work with Geckodriver. The API for Webdriver::Tiny is slightly different from Selenium::Firefox so your code will nee

Re: about package method returns

2019-11-01 Thread Dermot
gards. > > On Fri, Nov 1, 2019 at 4:56 AM Dermot wrote: > >> Hi, >> >> You cannot return `die`, die is a fatal exception that causes`test.pl` >> to exit immediately. >> One option would be to use warn to emit a warning to STDERR and return to >> the caller

Re: about package method returns

2019-10-31 Thread Dermot
Hi, You cannot return `die`, die is a fatal exception that causes`test.pl` to exit immediately. One option would be to use warn to emit a warning to STDERR and return to the caller and let them handle the failure. You may as well add the $! to the output so the caller gets a copy of the last error

Re: Help me with a regex problem

2019-10-26 Thread Dermot
You might consider using Regexp::Common::net. It provides a convenient set of functions for matching IP v4, v6 and mac addresses. https://metacpan.org/pod/Regexp::Common::net On Fri, 25 Oct 2019 at 19:43, John W. Krahn wrote: > On 2019-10-25 3:23 a.m., Maggie Q Roth wrote: > > Hello > > Hell

Re: Website Files Preview as Thumbnail

2019-04-26 Thread Dermot
I suspect these sites you refer to are storing of the document's title and are using that populate the icons. On Fri, 26 Apr 2019 at 08:51, James Kerwin wrote: > Hi All, > > I promise this question is about Perl. I've googled this a lot and still > can't find where to start. > > I run a publicat

Re: Is perl user specific

2016-01-06 Thread Dermot
try perl -v to find our what version you are actually running. Good luck, Dermot. On 6 January 2016 at 15:34, Ankita Rath wrote: > Hi all, > > I am trying to execute some perl scripts. I am getting following error. > But other user in the same server are not getting the error. So can an

Re: sure would be nice if Perl had trace command built-in

2015-12-22 Thread Dermot
on the eye. I also find Test::Vars a useful tool for cleaning up code. It will find unused variables. Good luck, Dermot. On 12 Dec 2015 14:22, "Mike Flannigan" wrote: > > > On 12/10/2015 5:40 AM, beginners-digest-h...@perl.org wrote: > > > > > > On Mon,

Re: How does opendir/readdir process files

2015-01-09 Thread Dermot
[0] } sort { $a cmp $b } map {[$_, (stat("$dir/$_"))[9] ] } grep { ! /^\./ && -f "$dir/$_" } readdir($dh); Hope that helps, Dermot. On 9 January 2015 at 01:52, Harry Putnam wrote: > Opening a directory and

Re: Installing Perl and CPAN local

2014-03-04 Thread Dermot
files and the rest should be straight-forward. Good luck, Dermot. On 4 March 2014 10:42, Yosef Levy wrote: > Hello All, > > I am interesting install Perl and CPAN modules in custom location folders. > I am using WIN7 64bit. > Pls. provide me step by step in depended installati

Re: Programming Help Needed

2013-10-02 Thread Dermot
r. You may also ask around at your local Perl Mongers group. They may be able to offer some advise also. Good luck, Dermot. On 2 October 2013 01:12, Angela Barone wrote: > On Oct 1, 2013, at 2:45 PM, John SJ Anderson wrote: > > jobs.perl.org is the definitive place to post Perl job

Re: Help on saving and retrieving data structures

2013-09-14 Thread Dermot
++Storable On 14 September 2013 09:39, Shlomi Fish wrote: > Hi Shaji, > > On Sat, 14 Sep 2013 16:19:26 +0800 (SGT) > *Shaji Kalidasan* wrote: > > > Dear David, > > > > Thanks for throwing light on the topic by citing the security > implications of > > executing eval and also suggesting the ind

Re: Array iterator count

2013-08-09 Thread Dermot
ry about $counter 100 lines down the code. A feature request perhaps but I'm sure there are good reasons why the maintainers haven't added such a perlvar. Dermot. On 8 August 2013 18:11, jbiskofski wrote: > my $counter = 0; > foreach my $e ( a .. z ) { > $counter++;

Re: Email::Sender on Centos 6

2013-07-17 Thread Dermot
ay have and the options available. Best. Dermot. On 17 July 2013 19:01, Steven Buehler wrote: > Ok, this is just stupid. LOL. Not you.I was installing this on about > 40 systems yesterday, 5 of which were CentOS 6.x the rest were CentOS 5.x. > It would fail on all of the CentOS 6.

Perlbrew and Apache2::Request

2013-06-20 Thread Dermot
Hi, OS CentOS 6.3 perl=/home/dermot/perl5/perlbrew/perls/perl-5.16.0/bin/perl, %ENV: PERLBREW_BASHRC_VERSION="0.64" PERLBREW_HOME="/home/dpaikkos/.perlbrew" PERLBREW_MANPATH="/home/dpaikkos/perl5/perlbrew/perls/perl-5.16.0/man" PERLBREW_PATH="/hom

Re: Database interface

2013-02-04 Thread Dermot
This will do what you want but alas I do not think it's really suitable for a beginner. http://search.cpan.org/~oliver/Catalyst-Plugin-AutoCRUD-2.123610/lib/Catalyst/Plugin/AutoCRUD.pm Good luck, Dp. On 4 Feb 2013 22:16, "Simon Alfredsson" wrote: > Hi, > > I'm looking for a database management s

Re: Encoding problem

2012-07-18 Thread Dermot
>> >> That's done the trick. Thank you Shlomi. > > You're welcome. Next time, please reply to the list (see the bottommost line > of my signature). Schoolboy error on my part. Dammed Gmail defaults. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginn

Encoding problem

2012-07-18 Thread Dermot
re in the file so I must be doing something wrong but I can't see what. Can anyone offer any advise? Thanks in advance, Dermot. use strict; use warnings; use HTML::Entities; use Encode::Encoder qw(encoder); my %tests = ( 'Barré' => 'Barré',

Re: PDL

2012-03-05 Thread Dermot
not. I guess that is one of the reasons for not using the system perl but that's a topic for another thread. Have you tried `yum search linearalegra`? If you are going to use the system-installed perl then it might be wise to use the OS supplied modules as well. You could of course simply try to

Re: DBIx::Class add rows to table, confusion in perldoc example....

2012-02-05 Thread Dermot
On 5 February 2012 03:29, Rajeev Prasad wrote: > > > Author says: > > Adding and removing rows > To create a new record in the database, you can use the create method. It > returns an instance of My::Schema::Result::Album that can be used to access > the data in the new record: > > my $new_album

Re: Help in search concept

2011-12-20 Thread Dermot
zero or more times. the i flags means make the search case-insensitive. Have a look at perldoc perlretut (http://perldoc.perl.org/perlretut.html) for more tips. Good luck, Dermot. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: multi-column array

2011-12-01 Thread Dermot
On 30 November 2011 23:06, Jeswin wrote: > I've been trying to figure out how to print 2 arrays into 2 columns. I > came across this code and it works but gives me a problem in the > output. > > *BEGIN > CODE* > sub transpose { >

Re: Plus Plus operator

2011-11-24 Thread Dermot
On 24 November 2011 03:40, samjesse wrote: > Hi > > what does this mean >  foreach $msg (@subjects) { >     $subjects{$msg}++; >  } > > thx http://perldoc.perl.org/perlop.html#Auto-increment-and-Auto-decrement -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-m

Re: Customizing vi/vim for Perl

2011-11-20 Thread Dermot
On 20 November 2011 20:13, Phil Dobbin wrote: > On 20/11/11 19:25, "Dermot" wrote: > >>> Take a look to http://www.vim.org/scripts/script.php?script_id=556 >> >> I'd second this endorsement for these perl support script. I never use >> the menus bu

Re: Customizing vi/vim for Perl

2011-11-20 Thread Dermot
On 18 November 2011 18:44, Juan Luis Aranda wrote: > 2011/11/18 Parag Kalra : >> Hi, >> >> I generally use vi/vim for my day to day Perl scripts. >> >> What are different packages I can use to make vi/vim extensively customized >> for Perl.  For example -  it should be able inform me about the kno

Re: Hash in a class

2011-10-28 Thread Dermot
On 28 October 2011 12:40, Gary wrote: >> Thanks. > > Sh1t. How do I use this in a foreach, please? > > Trying >  foreach my $key (sort keys $self->{_cfg} ) { > I get "Type of arg 1 to keys must be hash (not hash element)" > foreach my $key (sort keys %{ $self->{_cfg} } ) { # do stuff } %{ $refe

Re: perl locale issue

2011-10-27 Thread Dermot
e command-line or running something like logwatch. The answer is exactly as the error reads. You need to set-up you environment to include a LANGUAGE, LC_ASS and LANG variable (I'm not sure if you need all three but why not do things by half) . Put them somewhere like /etc/profile or .bashr

Re: don't know where to start??? comparing files

2011-10-13 Thread Dermot
system perl and I was under the impression that using `env perl` was the preferred method. So it you using perlbrew, local::lib or just build a perl in some exotic directory, are you suggested we give the path to the perl you want to use? What's the reasoning? Thanks, Dermot -- To un

Re: Introducing myself...

2011-10-05 Thread Dermot
On 4 October 2011 20:44, John SJ Anderson wrote: > Hi everybody -- > > As Casey announced the other day, I recently volunteered to take over > list moderation duties. I think this list is a really important > resource for the Perl community, and I think it's important that > people new to Perl can

Re: install the prerequisite module automatically

2011-08-05 Thread Dermot
On 5 August 2011 10:28, Feng He wrote: > On Fri, Aug 5, 2011 at 4:36 PM, Dermot wrote: > Thanks. > Do you mean this section in Makefile.PL? > >    PREREQ_PM => { >        'Test::More' => 0, >    }, > > Regards. Yes. That's the form you will

Re: install the prerequisite module automatically

2011-08-05 Thread Dermot
On 5 August 2011 02:12, Feng He wrote: > Hi, > > I have wrote a module and released it with module-starter. > (http://search.cpan.org/~xsawyerx/Module-Starter-1.58/lib/Module/Starter.pm) > > When I install it from the CPAN shell, how can I make the shell > install the prerequisite modules automati

Re: String Formatting by Column

2011-06-24 Thread Dermot
one I generally use. This module also has a _PP (pure perl) version[1] in case you do not have a compiler on your PC. 1) http://search.cpan.org/perldoc?Text%3A%3ACSV_PP HTH, Dermot. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: String Formatting by Column

2011-06-24 Thread Dermot
format would require another module but I'll leave others to make that recommendation. Perhaps you could have a look at those, try and write something and when, or if, you get stuck, come back to the list showing the code you've got and get some pointers. Thanks, Dermot. 1) http://se

Re: Relative URIs in served pages

2011-06-01 Thread Dermot
On 1 June 2011 16:20, John Delacour wrote: > > I have a script in cgi-bin which gathers information from the user and > replaces placeholders in a pre-written html page with the data collected via > a different html interface.  Since the script needs to run from various > servers I don't want to u

Re: Ten Years of Considerate Help

2011-05-31 Thread Dermot
On 30 May 2011 01:57, Casey West wrote: > On Fri, Apr 22, 2011 at 12:59 AM, Casey West wrote: > > > I received three unsolicited recommendations for moderators to this list, > one volunteer, and three unsolicited requests to deny moderatorship from > some individuals. Some of these lists intersec

Re: Help with indentation

2011-04-23 Thread Dermot
>> >> I have been trying to follow one of code indentation guidelines from >> wikipedia, but I have some questions that I can find answers, I would >> appreciate if someone could help me or point me towards better references. >> > No. The indentation should provide a visual clue as to where the loo

Re: Nature of this list

2011-04-20 Thread Dermot
On 19 April 2011 16:00, Peter Scott wrote: ... > :[...] > : * If you think what you are writing may be taken in a way you didn't > : intend, please add a smiley :-) Many flame wars are stopped by a simple > : smiley! > : * No flames. If your fingers are burning as you are typing the email, it > :

Re: @INC problem with ssh

2011-04-07 Thread Dermot
On 7 April 2011 12:33, C.DeRykus wrote: > On Apr 7, 2:07 am, paik...@gmail.com (Dermot) wrote: >> On 7 April 2011 00:24, C.DeRykus wrote: >> > On Apr 6, 7:45 am, paik...@gmail.com (Dermot) wrote: >> >> Hello All, >> >> >> I have a issue when I

Re: @INC problem with ssh

2011-04-07 Thread Dermot
On 7 April 2011 00:24, C.DeRykus wrote: > On Apr 6, 7:45 am, paik...@gmail.com (Dermot) wrote: >> Hello All, >> >> I have a issue when I attempt to run a script on one host (B) that is >> called by ssh from other host (A). >> >> On host B, I have the script

@INC problem with ssh

2011-04-06 Thread Dermot
Hello All, I have a issue when I attempt to run a script on one host (B) that is called by ssh from other host (A). On host B, I have the script in /usr/local/bin/stuff.pl. The script has the following near the top: use strict; use warnings; use lib qw(/etc/perl); use MyApp::Image; use MyApp::S

Re: Creating PDF/FDF files

2011-03-01 Thread Dermot
On 1 March 2011 15:58, Mike Blezien wrote: > Hello, > > I'm working on a small project that will require us to parse data submitted > from an Adobe Reader form, i.e questionaires. Then we'll need to generate > either a PDF or FDF temp file, attach it to an email, and send it to use. Now > parsi

Re: about the message queue server

2010-12-09 Thread Dermot
On 9 December 2010 14:38, practicalperl wrote: > Hi, > > Would you please recommend me a high performance message queue server? > Currently I'm looking up at: > http://search.cpan.org/~dsnopek/POE-Component-MessageQueue-0.2.10/lib/POE/Component/MessageQueue.pm > > But I know nothing about its perf

Re: Encoding issues.

2010-08-13 Thread Dermot
On 13 August 2010 13:35, Kwaku Addo Ofori wrote: > Hi Guys, > > I just wrote a script that retrieves some records from a MYSQL database. > These records contain a lot of the special characters from the French > language. I need a way to decode these characters properly before sending > them on to

Re: Accessing array from Perl & DBI using Template Toolkit

2010-08-10 Thread Dermot
On 9 August 2010 13:25, me @ wrote: > Hi, Hi, Not sure why you had to send this twice. I'm trying to pickup CGI web application programming using Perl, DBI & ... ... start of list.tt <<< > Content-type: text/html > > > [% PROCESS header %] > Form List > > >    [% FOREACH kar IN kars.val

Re: META - Bounces from the list

2010-07-23 Thread Dermot
On 22 July 2010 01:38, Jeff Pang wrote: > A basic concept: > > For people the address of f...@gmail.com and f...@googlemail.com are the same > one. > But for the list admin program they are really two different ones. > > Also people may know that something like f...@aol.com and f...@aim.com, > b.

Re: META - Bounces from the list

2010-07-22 Thread Dermot
n 22 July 2010 18:05, Brandon McCaig wrote: > On Wed, Jul 21, 2010 at 5:38 AM, Dermot wrote: >> I suspect this might be because I recently changed my email address >> domain from googlemail.com to gmail. I can't now un-subscribe because >> the mailer program will not r

META - Bounces from the list

2010-07-21 Thread Dermot
<4c447d64.10...@shaw.ca> <000301cb27bd$53b0a9a0$fb11fc...@com> Date: Tue, 20 Jul 2010 09:58:07 +0100 Message-ID: Subject: Re: Can't use string 1 as HASH ref while strict refs in use From: Dermot To: Perl Beginners Content-Type: text/plain; charset=ISO-8859-1 Content-T

Re: Can't use string 1 as HASH ref while strict refs in use

2010-07-20 Thread Dermot
On 20 July 2010 04:40, Mimi Cafe wrote: > I passed a has reference to my sub and tried dereferencing it within the sub > and get an exception Can't use string ("1") as HASH ref while strict refs in > use. > > > my %mail_parameters = ( >        'Fname' => "$nickname_db_exist[1]", >        'Lname' =

Re: DBI under SOAP/mod_perl

2010-07-20 Thread Dermot
Hi Octavian, On 19 July 2010 06:07, Octavian Rasnita wrote: > Does the $dsn contain the full path to the database? Yes. The dsn line is declared like this: DBI SQLite3 ### my $dsn = 'dbi:SQLite:dbname=/var/db/MyApp/myapp.db'; It's outside the constructor which I am not sure is good prac

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

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()'. > > ---        -

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: 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: 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: 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: 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: [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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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-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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 答复: 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: 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: 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: 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 : > 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

  1   2   3   4   >