green_lakers has asked for the wisdom of the Perl Monks concerning the following question:
I have the following variables:- $a=abc.1.0.1.0 $b=bnnn.1.0.1.1 $c=dnnnnn.1.0.2.0 ....etc........ i want to split the variable $a, $b, $c and put that value in two sepa +rate varaibles. for example $a is splitted to $a2 = 1.0.1.0 (always the last four digits of the string) $a1 = abc (Rest of the String) $b is splitted to $b2 = 1.0.1.1 (always the last four digits of the string) $b1 = bnnn (Rest of the String) i am trying to get the results with a for loop Can anyone please help?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: string manipulation
by meraxes (Friar) on Jan 12, 2009 at 22:27 UTC | |
by johngg (Canon) on Jan 12, 2009 at 23:14 UTC | |
by meraxes (Friar) on Jan 12, 2009 at 23:44 UTC | |
by johngg (Canon) on Jan 13, 2009 at 10:37 UTC | |
|
Re: string manipulation
by Lawliet (Curate) on Jan 12, 2009 at 22:27 UTC | |
by jeffa (Bishop) on Jan 19, 2009 at 17:11 UTC | |
by Lawliet (Curate) on Jan 19, 2009 at 17:29 UTC | |
|
Re: string manipulation
by swampyankee (Parson) on Jan 13, 2009 at 15:36 UTC | |
|
Re: string manipulation
by sanku (Beadle) on Jan 13, 2009 at 10:18 UTC |