in reply to Re: strange syntax
in thread strange syntax

Thank you for answering can you explain why $kbin = split( is used and not @kbin = split(

Replies are listed 'Best First'.
Re^3: strange syntax
by aaron_baugher (Curate) on Jun 17, 2015 at 02:07 UTC

    That's probably just a mistake. Calling split in scalar context will assign the number of items produced by the split to the scalar, so $kbin will contain the number of items the split returns, not the items themselves. That might make sense in some cases, but not here, since $kbin is being used as if it's an array later.

    My first guess would be that this was written by a PHP programmer, since their arrays don't use a different sigil like Perl's do.

    Aaron B.
    Available for small or large Perl jobs and *nix system administration; see my home node.