http://qs321.pair.com?node_id=1213056


in reply to how to get out data of a hash?

Why?

Concatenation (.) forces scalar context. Arrays in scalar context return their size.

How?

You can either use join:
$tmp = "paste -d';' " . join(' ', @{ $csvheader{x_} }) . ' > all.x.txt +';

or just double quote the array, its members will be separated by $" which is a space by default:

$tmp = "paste -d';' @{ $csvheader{x_} } > all.x.txt";

Alternative

Instead of using paste, use Text::CSV_XS to process your CSV files. It handles quoted fields, escaped separators and quotes, and more.

($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,

Replies are listed 'Best First'.
Re^2: how to get out data of a hash?
by blaui (Initiate) on Apr 18, 2018 at 07:05 UTC
    Thanx a lot. :)
Re^2: how to get out data of a hash?
by Anonymous Monk on Apr 17, 2018 at 13:02 UTC
    "CPAN is your bestest friend." There you will find fast, thoroughly-tested modules for correctly handling all kinds of files and formats – JSON, XML, CSV, you name it. "There's more than one way to do it," but "the best way to do it" is always to "let somebody else do it for you." Just use their module, knowing that it is known to work correctly in all cases.

      'but "the best way to do it" is always to "let somebody else do it for you." Just use their module, knowing that it is known to work correctly in all cases.'

      Not sure if this is sarcasm, but bugs are found, reported and patched in CPAN modules all the time. Letting someone else do it for you, without understanding how things work and what they actually do can hardly be described as 'the best way'.

        It's not sarcasm. It's you know who offering a sincere and oft repeated—and oft corrected—opinion.

      A reply falls below the community's threshold of quality. You may see it by logging in.