in reply to Re^2: Truncate Data from MySQL
in thread Truncate Data from MySQL
then again, I don't like the 0..n slice. Why not just use pop?sub first_x { my @data = ( split /\s+/, $_[0], $_[1] + 1 )[ 0 .. $_[1] - 1 ]; return wantarray ? @data : join ' ' , @data ; }
peace, spazmsub first_x { my @data = split /\s+/, $_[0], $_[1] + 1 ; pop(@data); #throw away last element return wantarray ? @data : join ' ' , @data ; }
|
|---|