| Subject: | Re: splitting and replacing characters |
|---|---|
| From: | John W. Krahn |
| Date: | Mon, 09 Nov 2009 10:28:15 -0800 |
| Newsgroups: | perl.beginners |
rithu wrote: Hi, Hello, Please help me to split a string as follows.. my $line = "abcdefghijkl" the expected output should be like: ab ef ij The logic is like alternate 2 characters should be removed.... $ perl -le' my $line = "abcdefghijkl"; my @data = unpack "(a2x2)*", $line; print for @data; ' ab ef ij John -- The programmer is fighting against the two most destructive forces in the universe: entropy and human stupidity. -- Damian Conway |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: How to catch the DBI module error message, Parag Kalra |
|---|---|
| Next by Date: | Re: the classic "which is the fastest way to sort" question, Michael Alipio |
| Previous by Thread: | Re: splitting and replacing characters, Robert Wohlfarth |
| Next by Thread: | How to catch the DBI module error message, Parag Kalra |
| Indexes: | [Date] [Thread] [Top] [All Lists] |