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 -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/