in reply to Split using special charater data type scalar

Please provide a minimal code example which actually can be complied, run and shows your problem. When I fixed syntax errors in your code, it actually ran and splitted your string into pieces:

use warnings; use strict; my $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); __END__ 1.74,1.75
It looks like what you wanted, isn't it?

By the way, if you want just to extract these two values from this string, it may be better to match them, not to split:

my $str = '--------------- 1.74 --> 1.75 :test/document.txt'; my ($values,$cf) = $str =~ /([\d.]+)\s*-->\s*([\d.]+)/; print "$values,$cf\n"; __END__ 1.74,1.75
What I used is m/PATTERN/ operator described in perldoc perlop -> Regexp Quote-Like Operators in array context (with Capture groups).

Sorry if my advice was wrong.