Re: matching lines like grep

2008-07-07 Thread John W. Krahn
Noah wrote: Hi there fellow PERL coders. Hello, I am trying to match lines between a template file and a configuration file. If the configuration is missing a particular line that is found in the template file then it is printed. If the configuration file has an extra line then it to gets

Re: matching lines like grep

2008-07-07 Thread Rob Dixon
Noah wrote: > in line Below > >>> let me put toether some bogus output files. >> >> You could just describe your output. Are you getting nothing at all? Or is it >> showing all lines of both files? Or none from one and all from the other? Or >> just more or fewer lines than you think is correct?

Re: Debug Help Please

2008-07-07 Thread Andy
On Jul 7, 11:53 am, [EMAIL PROTECTED] (Rob Dixon) wrote: > Andy wrote: > > > Funny how when you talk to different people you get different ways of > > looking at it. > > > One of the Perl guys at my office. told me that I can use > > use strict; > > use warnings; > > > but he said , he really doesn

Re: matching lines like grep

2008-07-07 Thread Noah
in line Below let me put toether some bogus output files. (Please bottom-post your responses to this group. Thanks.) You could just describe your output. Are you getting nothing at all? Or is it showing all lines of both files? Or none from one and all from the other? Or just more or fewer l

Spam?

2008-07-07 Thread Gunnar Hjalmarsson
This message: http://www.mail-archive.com/beginners%40perl.org/msg95274.html was considered spam by some mail service. Who is the moron who uses that kind of spam prevention service on an address that is subscribed to a mailing list? Please disconnect the service or unsubscribe from the list.

Re: Debug Help Please

2008-07-07 Thread John W. Krahn
Andy wrote: Funny how when you talk to different people you get different ways of looking at it. Yes, that is how the world works. In Perl there is the expression TIMTOWTDI (There Is More Than One Way To Do It) which means that you will probably get different opinions on "The Right Way" to

Re: recording with perl

2008-07-07 Thread Octavian Rasnita
From: "Jay Savage" <[EMAIL PROTECTED]> On Sun, Jul 6, 2008 at 4:37 AM, Octavian Rasnita <[EMAIL PROTECTED]> wrote: Hi, Does anyone know if there is a perl module that can be used for recording in .wav format? (One that can be used under both Linux and Windows, or at least under Windows.) Than

Re: anagrams

2008-07-07 Thread Brad Baxter
On Jul 6, 9:31 am, [EMAIL PROTECTED] (Gunwant Singh) wrote: > Thnx for your solution, although I did not get the complete solution as > explained in your earlier email. > Can you please simplify your explanation. Also, would it not be possible > w/o making wordlist.unified. > > Thanks. 1 #!

Re: Config::General

2008-07-07 Thread Dermot
Hi Rob, 2008/7/7 Rob Dixon <[EMAIL PROTECTED]>: > Hi Dermot. > > Does this help? > > Rob > > > use strict; > use warnings; > > use Config::General; > > my $config = Config::General->new( -ConfigFile => \*DATA); > my %config = $config->getall; > > print $config{model}{connect_info}{'dbi:SQLite'};

Re: how to read the last line of a file directly?

2008-07-07 Thread Randal L. Schwartz
> "Thomas" == Thomas Bätzler <[EMAIL PROTECTED]> writes: Thomas> Off the top of my head: And off the top of your head, you reinvented File::ReadBackwards for no real purpose. Might as well use the tested module instead. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503

Re: Config::General

2008-07-07 Thread Rob Dixon
Dermot wrote: > HI All, > > Is anyone familiar with the workings of Config::General? > > I am struggling to get my configuration values out of a file. > > My config file looks like this: > > name myApp > > > dbi:SQLite __HOME__/database.db > > > > > When I use Data::Dumper t

Re: Question about print

2008-07-07 Thread Gunnar Hjalmarsson
David Romero wrote: <<"EOF"; is the begging of a string EOF is the end of a string. This is used to create a multi line string. with out this is much more work print SENDMAIL "From: Tom Christiansen <[EMAIL PROTECTED]>\n"; print SENDMAIL "To: Nathan Torkington <[EMAIL PROTECTED]>\";

Re: Question about print

2008-07-07 Thread Gunnar Hjalmarsson
loody wrote: Dear all: below is what I excerpt form "perl cook book". What does <<"EOF" mean at the end of print? It has nothing to do with the print() function. It's the beginning of a "here document". http://perldoc.perl.org/perlop.html#%3c%3cEOF open(SENDMAIL, "|/usr/sbin/sendmail -oi -

Re: arrayref

2008-07-07 Thread Rob Dixon
elavazhagan perl wrote: > > Please have a glance on the following code and suggest me to purify it. > My requirement is when the user choose the region,I need to display the > countries specific to that regions. > I have been trying in both hash and array references.This one is for > arrayref.

Re: Debug Help Please

2008-07-07 Thread Rob Dixon
Andy wrote: > > Funny how when you talk to different people you get different ways of > looking at it. > > One of the Perl guys at my office. told me that I can use > use strict; > use warnings; > > but he said , he really doesn't because he wants the script to do what > it needs to do... Then

Re: Question about print

2008-07-07 Thread David Romero
<<"EOF"; is the begging of a string EOF is the end of a string. This is used to create a multi line string. with out this is much more work print SENDMAIL "From: Tom Christiansen <[EMAIL PROTECTED]>\n"; print SENDMAIL "To: Nathan Torkington <[EMAIL PROTECTED]>\"; uff. .. On Mo

Re: Config::General

2008-07-07 Thread Dermot
2008/7/7 Stewart Anderson <[EMAIL PROTECTED]>: > > I used Config::Simple recently. Unless you really need/want the > extra functionality/complexity I'd recommend giving that a look. > Thanx Stu. I had a quick dabble. Unfortunately Config::Simple does seem to be able to handle structured data

arrayref

2008-07-07 Thread elavazhagan perl
Hi, Please have a glance on the following code and suggest me to purify it. My requirement is when the user choose the region,I need to display the countries specific to that regions. I have been trying in both hash and array references.This one is for arrayref. I have already the values of $

Question about print

2008-07-07 Thread loody
Dear all: below is what I excerpt form "perl cook book". What does <<"EOF" mean at the end of print? thanks for your help, miloody open(SENDMAIL, "|/usr/sbin/sendmail -oi -t -odq") or die "Can't fork for sendmail: $!\n"; print SENDMAIL <<"EOF"; From: Tom Christiansen <[EMAIL PROTECTED]> To: Nathan

Re: recording with perl

2008-07-07 Thread Jay Savage
On Sun, Jul 6, 2008 at 4:37 AM, Octavian Rasnita <[EMAIL PROTECTED]> wrote: > Hi, > > Does anyone know if there is a perl module that can be used for recording in > .wav format? > (One that can be used under both Linux and Windows, or at least under > Windows.) > > Thank you. > > Octavian > Record

Config::General

2008-07-07 Thread Dermot
HI All, Is anyone familiar with the workings of Config::General? I am struggling to get my configuration values out of a file. My config file looks like this: name myApp dbi:SQLite __HOME__/database.db When I use Data::Dumper to dump the whole config I see this

Re: Debug Help Please

2008-07-07 Thread Andy
On Jul 5, 9:54 pm, [EMAIL PROTECTED] (John W. Krahn) wrote: > Andy wrote: > > > Greets > > Hello, > > > Thanks for your earlier help, but I am still stuck. > > > I took your advice and I believe I put together the script as you > > said. > > Except that you apparently haven't yet enabled the warnin

RE: Getting file type in perl

2008-07-07 Thread Thomas Bätzler
Rajnikant <[EMAIL PROTECTED]> wrote: > Thanks Thomas. > > I tried same with File::Type :). I considered that module, too, but it's got some problems: http://cpanratings.perl.org/dist/File-Type While I don't mind the memory footprint, I would rather have a module that uses a magic file that can

RE: Getting file type in perl

2008-07-07 Thread Rajnikant
Thanks Thomas. I tried same with File::Type :). -Original Message- From: Thomas Bätzler [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2008 4:25 PM To: Perl Beginners Cc: Rajnikant Subject: RE: Getting file type in perl Rajnikant <[EMAIL PROTECTED]> asked: > Unix command file gives f

RE: Getting file type in perl

2008-07-07 Thread Thomas Bätzler
Rajnikant <[EMAIL PROTECTED]> asked: > Unix command file gives file type of that file. > # file a.txt.gz > a.txt.gz: gzip compressed data, was "a.txt", from Unix > > How can I achieve same in perl? Using a module like http://search.cpan.org/~pardus/File-MimeInfo-0.15/lib/File/MimeInfo/Magic.pm

Getting file type in perl

2008-07-07 Thread Rajnikant
Hello everyone, Unix command file gives file type of that file. # file a.txt.gz a.txt.gz: gzip compressed data, was "a.txt", from Unix How can I achieve same in perl? Thanks, Rajnikant DISCLAIMER == This e-mail may contain privileged and confidential information which is the prope