Re: No Output in Terminal

2010-10-01 Thread Chas. Owens
On Fri, Oct 1, 2010 at 18:56, Brandon McCaig wrote: > On Fri, Oct 1, 2010 at 1:07 AM, Chas. Owens wrote: > >> Okay, here is what I think happened: you were print a carriage return. > > I thought that Mac OS X used UNIX newlines though (though I'm not a > Mac user). :-/ So shouldn't "\n" be interp

Re: path names in a perl-script: a newbie-question

2010-10-01 Thread Jim Gibson
At 1:29 AM +0200 10/2/10, jobst müller wrote: Hi all i am new to the list! i am new to Linux and new to PERL too. I am trying to get this perl script up and running. I have installed OpenSuse-Linux 11.3 What is wanted: I have a bunch of HTML-files, stored in a folder. with the Perl-Script

Re: No Output in Terminal

2010-10-01 Thread Brandon McCaig
On Fri, Oct 1, 2010 at 7:01 PM, Brandon McCaig wrote: > decimal 126, of which the 10 or CF in the DOS/Windows newline should s/CF/LF/ :-[ -- Brandon McCaig V zrna gur orfg jvgu jung V fnl. Vg qbrfa'g nyjnlf fbhaq gung jnl. Castopulence Software -- To unsubscr

path names in a perl-script: a newbie-question

2010-10-01 Thread jobst müller
Hi all i am new to the list! i am new to Linux and new to PERL too. I am trying to get this perl script up and running. I have installed OpenSuse-Linux 11.3 What is wanted: I have a bunch of HTML-files, stored in a folder. with the Perl-Script (see below) i want to parse the HTML-files. I ha

Re: No Output in Terminal

2010-10-01 Thread Shawn H Corey
On 10-10-01 06:56 PM, Brandon McCaig wrote: On Fri, Oct 1, 2010 at 1:07 AM, Chas. Owens wrote: Okay, here is what I think happened: you were print a carriage return. I thought that Mac OS X used UNIX newlines though (though I'm not a Mac user). :-/ So shouldn't "\n" be interpreted as an LF (

Re: No Output in Terminal

2010-10-01 Thread Brandon McCaig
On Fri, Oct 1, 2010 at 8:26 AM, Bob McConnell wrote: > AKA carriage return, it suggests you have DOS/Windows line endings > instead of Unix. You can clean them up in the source files with the > dos2unix or tr filters. The latter looks something like this: > > $> tr "\r\n" "\n" < bad.pl > good.pl

Re: No Output in Terminal

2010-10-01 Thread Brandon McCaig
On Fri, Oct 1, 2010 at 1:07 AM, Chas. Owens wrote: > Okay, here is what I think happened: you were print a carriage return. I thought that Mac OS X used UNIX newlines though (though I'm not a Mac user). :-/ So shouldn't "\n" be interpreted as an LF (0x0A) on Macs, the same as it would in other u

Re: Trap syntax error inside eval?

2010-10-01 Thread C.DeRykus
On Sep 30, 9:07 pm, jon.herman...@gmail.com (Jon Hermansen) wrote: rg/> > > ... > >  Thanks for the help. I was able to find a few workarounds with your > examples. I found something interesting in my testing-- at the end of my > sub, if instead of: > > return 1 unless ($@); > > > I use: > > if (no

Re: loading and comparing large hashes

2010-10-01 Thread Shlomi Fish
Hi Richard, CCing the list. On Friday 01 October 2010 18:32:32 Richard Green wrote: > Thanks so much Shlomi, I assumed the database was the probably the best > course of action. I haven't worke with C in ten years but was considering > it for this problem. Can you point me toward the solution you

RE: No Output in Terminal

2010-10-01 Thread Bob McConnell
AKA carriage return, it suggests you have DOS/Windows line endings instead of Unix. You can clean them up in the source files with the dos2unix or tr filters. The latter looks something like this: $> tr "\r\n" "\n" < bad.pl > good.pl Bob McConnell -Original Message- From: Parag Kalra [ma

Re: Trap syntax error inside eval?

2010-10-01 Thread Dr.Ruud
On 2010-10-01 04:37, Jon Hermansen wrote: sub is_valid_xml { my ($content) = @_; eval { my $xs = XML::Simple->new(); my $ref = $xs->parse_string($content); }; return 1 unless ($@); } Don't test the truth of $@, but use the return value of the eval.

Re: How do I remove repreating lines from an array?

2010-10-01 Thread Dr.Ruud
On 2010-09-30 16:56, venkates wrote: the intersection list has redundant in its terms. How do I fix this? See List::MoreUtils::uniq. Or use a hash. -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org

Re: loading and comparing large hashes

2010-10-01 Thread Shlomi Fish
Hi Richard, On Friday 01 October 2010 05:33:20 Richard Green wrote: > Hi everyone, could use some advice on a perl script I wrote using hashes. I > have three files ( each file is a list of indexes) my program loads these > indexes into hashes and compares the differences and similarities between