Stefan -- ...and then [EMAIL PROTECTED] said... % % hi guys, % I would like to split a line like that % % # FRI MAY 02 .... % % in two parts: % % $bash = # % $rest = FRI MAY....
Hokay... % % % in my version ($bash, $rest) = split(/\s/, $line); % % $rest only contains "FRI" because the line is splitted at every blank. how can % I achieve % that the line ist splitted only at the first blank after # ??? Let's see if I've figured out anything along the way. You should make you $rest into an array @rest so that it will suck up the rest of the line, like ($bash, @rest) = split(/\s/, $line); or *perhaps* cast it into an array context like ($bash, ($rest)) = split(/\s/, $line); to force the slurp and then dump it into a string. Try 'em both; neither is tested. % % thanks in advance! HTH & HAND % % greetings % % stefan :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
msg25351/pgp00000.pgp
Description: PGP signature