in reply to Split using special charater data type scalar
$text='--------------- 1.74 --> 1.75 :test/document.txt'; sub func { my ($text) = (@_); $text =~ s/[\s|\n]*//g; $text =~ s/^[---]+//; my ($aa,$cd)=split(/:/,$text); my ($values,$cf)= split(/-->/,$aa); print "$values,$cf\n"; } func($text);
prints "1.74,1.75". Which it should????
|
|---|