#!/usr/bin/perl use strict; use warnings; use Scalar::Util qw{ looks_like_number }; use Test::More tests => 1; *ARGV = *DATA{IO}; my $expected = [ ['1,2,\'hello\',\'aerf\''], ['1,2,\'hello\',\'aerf\''], ['1,2,\'hello\',\'aerf\''], ['1,2,\'hello\',\'aerf\''], ['1,2,\'hello\',\'aerf\''], ['1,2,\'hello\',\'aerf\''] ]; my $result = [ map [ join ",", map looks_like_number($_) ? $_ : "'$_'", split " " ], <> ]; is_deeply $result, $expected, 'same'; __DATA__ 1 2 hello aerf 1 2 hello aerf 1 2 hello aerf 1 2 hello aerf 1 2 hello aerf 1 2 hello aerf #### ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,