Re: How do I trim UTF-8 strings?

2009-07-23 Thread Chas. Owens
On Thu, Jul 23, 2009 at 18:43, Jenny Chen wrote: > Hi All, > > I need some help with utf-8 string handling in Perl. I tried to trim utf-8 > strings using Perl. Follow is the main portion of the codes, but it does not > work. Any help will be greatly appreciated. > > Jenny > - > > open (DIC_OL

Re: while() I have a simple question

2009-07-23 Thread Chas. Owens
On Thu, Jul 23, 2009 at 21:29, Steve Bertrand wrote: > I just ran into an issue where I was loosing literally half of some > expected data, which for a theoretical accounting system, would make for > some interesting audit trails (I already shave a fraction for myself, > but 50% will be noticeable

Re: Question on approach

2009-07-23 Thread Chas. Owens
On Fri, Jul 24, 2009 at 00:18, Joseph L. Casale wrote: > Hi, > I have some data I will read into an array that is the format > "some_string"@"date" such as "foo/bar/b...@07-23-2009-11.42.02". > > To work with this, I will convert the date part (everything after > the "@" to the epoch format so it's

Re: sort with special order

2009-07-23 Thread Chas. Owens
On Fri, Jul 24, 2009 at 00:14, sys adm wrote: > Hi, > > When I got a word list, I want it to be sorted with special order. > for example, I got this array: > > ("dog","is","a","there"); > > I want the sorted result is: > > ("there","is","a","dog"); > > How to code it? Thank you. snip You need to s

Question on approach

2009-07-23 Thread Joseph L. Casale
Hi, I have some data I will read into an array that is the format "some_string"@"date" such as "foo/bar/b...@07-23-2009-11.42.02". To work with this, I will convert the date part (everything after the "@" to the epoch format so it's easy to sort accurately. I figured I would create a hash with key

sort with special order

2009-07-23 Thread sys adm
Hi, When I got a word list, I want it to be sorted with special order. for example, I got this array: ("dog","is","a","there"); I want the sorted result is: ("there","is","a","dog"); How to code it? Thank you. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands,

Re: Using perl code in K and C shell

2009-07-23 Thread John W. Krahn
Subject: Re: Using perl code in K and C shell Jenny Chen wrote: I need some help with utf-8 string handling in Perl. I tried to trim utf-8 strings using Perl. Follow is the main portion of the codes, but it does not work. Any help will be greatly appreciated. What does that have to do with

while() I have a simple question

2009-07-23 Thread Steve Bertrand
I just ran into an issue where I was loosing literally half of some expected data, which for a theoretical accounting system, would make for some interesting audit trails (I already shave a fraction for myself, but 50% will be noticeable ;) Is my oversight as simple as knowing that the previous-to

Re: Using perl code in K and C shell

2009-07-23 Thread Jenny Chen
Hi All, I need some help with utf-8 string handling in Perl. I tried to trim utf-8 strings using Perl. Follow is the main portion of the codes, but it does not work. Any help will be greatly appreciated. Jenny - open (DIC_OLD, "<:utf8", $tmp_file) || die "can not open $tmp_file: ! \n"; ope

Re: PLEASE STOP SENDING MIALS

2009-07-23 Thread Shawn H. Corey
Alok Alan wrote: There is nothing that can be done about mials but if you don't want emails, see: http://lists.cpan.org/showlist.cgi?name=beginners -- Just my 0.0002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding

PLEASE STOP SENDING MIALS

2009-07-23 Thread Alok Alan

problem parsing CSV

2009-07-23 Thread John Thompson
Note: I'm new to the list. My apologies if I'm doing anything incorrectly. I'm relatively new to Perl. I'm having a problem with parsing some CSV data. I'm using Text::CSV_XS. I need to be able to process CSV files in the 2 formats in these sample files (not with the same script). FIle