Re: one liner to remove \xa0 characters

2006-09-25 Thread Tom Phoenix
On 9/25/06, Michael Alipio <[EMAIL PROTECTED]> wrote: I have several files with \xa0 characters.. Do you know how can I remove them? Those sound like non-breaking spaces, so you probably want them to become ordinary spaces. Have you tried using s/// or tr/// ? perl -pi.bak -e 'tr/\xa0/ /'

one liner to remove \xa0 characters

2006-09-25 Thread Michael Alipio
Hi, I have several files with \xa0 characters.. Do you know how can I remove them? Thanks. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Proper output

2006-09-25 Thread Rob Dixon
Sayed, Irfan (Irfan) wrote: > > I am not getting the proper output in @vob_rep Array. > > Following is my code > > # Perl script to change the replica name > > use strict; > > use warnings; > > my $fname = "/tmp/vob_list1"; > > open FILE,">",$fname or die $!; > > my $fname1 = "/tmp/repl_list1"; >

Re: perl scalar

2006-09-25 Thread D. Bolliger
elite elite am Montag, 25. September 2006 22:27: > I not sure what i doing wroung. I'm not sure either :-) > Street="Wright"; This is wrong syntax; "Street" is not a scalar variable, while "$street" would be. > print "$street\n"; $street is undef here, you didn't assign anything to the $stree

Re: Need help with repeating match

2006-09-25 Thread Rob Dixon
Zembower, Kevin wrote: > > I'm trying to process a file that mostly has lines like: > http://www.cpsp.edu.pk/jcpsp/ARCHIEVE/May2006/article5.pdf 342740 > http://www.scielo.br/pdf/bjid/v10n1/a04v10n1.pdf342741 > > However, it sometimes has more than one URL on a line, like: > http://db

RE: Matching a sub pattern and processing results

2006-09-25 Thread David Gilden
Dear Perl Gurus, Still struggling here... The problem is the data in the middle of the match is on multiple lines. Please reply directly and CC the list. Thanks, D.G. (kora musician / audiophile / webmaster @ www.coraconnection.com / Ft. Worth, TX, USA) >> I am having a little trouble understand

Re: perl scalar

2006-09-25 Thread elite elite
I not sure what i doing wroung. Street="Wright"; print "$street\n"; $street="Washington"; And i get this output. Street/[EMAIL PROTECTED] ~]$ Craig __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://

Need help with repeating match

2006-09-25 Thread Zembower, Kevin
I'm trying to process a file that mostly has lines like: http://www.cpsp.edu.pk/jcpsp/ARCHIEVE/May2006/article5.pdf 342740 http://www.scielo.br/pdf/bjid/v10n1/a04v10n1.pdf342741 However, it sometimes has more than one URL on a line, like: http://db.jhuccp.org/docs/732301.pdfhttp://db.

Re: Matching a sub pattern and processing results

2006-09-25 Thread Rob Dixon
David Gilden wrote: > > I am having a little trouble understanding matching and getting the sub pattern > saved to a Var. so that I can do a munge. I want to take the line returns and change them into > pipe characters '|' > All data records start with a date i.e. 01/01/2006 > But there are fie

Re: cmdline program to access s.m.a.r.t. data

2006-09-25 Thread Corey Hickey
[EMAIL PROTECTED] wrote: To Corey: Thanks for the URL. It does look promising although not so easy to see how to use it to quicly extract a temperature. Try something like this. I'm not good at perl yet (hence my being on this list), but it works for me. ---

Re: Proper output

2006-09-25 Thread D. Bolliger
Sayed, Irfan (Irfan) am Montag, 25. September 2006 14:50: > Can any body please help on this > > Regards > Irfan. Hello please read on at the bottom. _ > > From: Sayed, Irfan (Irfan) > Sent: Friday, September 22, 2006 12:59 PM > To: beginners@perl.org > Subject: Proper output > > > > Hi Al

Re: Your opinion on large file processing

2006-09-25 Thread Andrej Kastrin
Peter Scott wrote: On Sat, 23 Sep 2006 11:51:54 +0200, Andrej Kastrin wrote: the script below count word occurences in input file. It uses simple hash structure to store unique words and its frequencies. [...] foreach my $w (keys %words) { print "$w|$words{$w}\n"; }

SOAP::WSDL errors ?

2006-09-25 Thread Michael Gale
Hello, Can anyone point me in the right direction, I am trying to use the SOAP::WSDL module however it is error out before I ever get to use it: --snip-- #!/usr/bin/perl #use strict; use diagnostics; use warnings; use SOAP::Lite +trace => [transport => \&log_data]; use LWP::UserAgent; use SO

Re: Matching a sub pattern and processing results

2006-09-25 Thread Mumia W.
On 09/25/2006 06:47 AM, John W. Krahn wrote: Mumia W. wrote: On 09/24/2006 07:04 PM, David Gilden wrote: I am having a little trouble understanding matching and getting the sub pattern saved to a Var. so that I can do a munge. I want to take the line returns and change them into pipe characters

Re: Your opinion on large file processing

2006-09-25 Thread Peter Scott
On Sat, 23 Sep 2006 11:51:54 +0200, Andrej Kastrin wrote: > the script below count word occurences in input file. It uses simple > hash structure to store unique words and its frequencies. [...] > foreach my $w (keys %words) { > print "$w|$words{$w}\n"; > } [...] > Is that brainy solutio

Re: PACK statement compile error

2006-09-25 Thread Peter Scott
On Thu, 21 Sep 2006 10:25:19 -0500, Tony Frasketi wrote: > sub decodeURL { >$_ = shift; >tr/+/ /; >s/%(..)/pack('c', hex($1))/eg; >return($_); > } Please don't reinvent the wheel. use URI::Escape; $unescaped = uri_unescape($url); -- Peter Scott http://www.perlmedic.com/ http://w

RE: Proper output

2006-09-25 Thread Sayed, Irfan \(Irfan\)
Can any body please help on this Regards Irfan. _ From: Sayed, Irfan (Irfan) Sent: Friday, September 22, 2006 12:59 PM To: beginners@perl.org Subject: Proper output Hi All, I am not getting the proper output in @vob_rep Array. Following is my code # Perl script to change the

Re: 2 dimensional list syntax

2006-09-25 Thread John W. Krahn
hOURS wrote: > Hi all, Hello, > I'm trying to make a list of lists. The main list will have 926 sublists. > Each sublist will have 7 items. I organized the data into a very nice > text file all formatted the way (I thought?) I needed it to be. The text > file looks like so: > a, b, c, d, e

2 dimensional list syntax

2006-09-25 Thread hOURS
Hi all, I'm trying to make a list of lists. The main list will have 926 sublists. Each sublist will have 7 items. I organized the data into a very nice text file all formatted the way (I thought?) I needed it to be. The text file looks like so: a, b, c, d, e, f, g h

Re: Matching a sub pattern and processing results

2006-09-25 Thread John W. Krahn
John W. Krahn wrote: > > This should do what you want: > > > open FI, 'test.txt' or die "Could not open 'test.txt' $!"; > > my @lines; > while ( ) { > s/\s+\z//; > if ( m!^\d\d/\d\d/\d{4}\|! ) { Correction: if ( @lines && m!^\d\d/\d\d/\d{4}\|! ) { > print join( '|', spl

Re: Matching a sub pattern and processing results

2006-09-25 Thread John W. Krahn
Mumia W. wrote: > On 09/24/2006 07:04 PM, David Gilden wrote: >> >> I am having a little trouble understanding matching and getting the >> sub pattern saved to a Var. so that I can do a munge. I want to take >> the line returns and change them into pipe characters '|' All data >> records start wi

Re: Matching a sub pattern and processing results

2006-09-25 Thread John W. Krahn
David Gilden wrote: > Greetings, Hello, > I am having a little trouble understanding matching and getting the sub > pattern > saved to a Var. so that I can do a munge. I want to take the line returns and > change them into > pipe characters '|' > All data records start with a date i.e. 01/

Re: Matching a sub pattern and processing results

2006-09-25 Thread Mumia W.
On 09/24/2006 07:04 PM, David Gilden wrote: Greetings, I am having a little trouble understanding matching and getting the sub pattern saved to a Var. so that I can do a munge. I want to take the line returns and change them into pipe characters '|' All data records start with a date i.e. 0

Matching a sub pattern and processing results

2006-09-25 Thread David Gilden
Greetings, I am having a little trouble understanding matching and getting the sub pattern saved to a Var. so that I can do a munge. I want to take the line returns and change them into pipe characters '|' All data records start with a date i.e. 01/01/2006 But there are fields in between t