in reply to Re: comma within array
in thread comma within array

Hi, didnt think it would matter, but that array I showed was a sample array.. here is part of the real code:
@arrayCode = qw( $cn=join(",",@names); print@names; ); $ac = join("",@arrayCode); eval($ac);
this seems very strange to you, why the hell would i need to do this?! but unfortunately I do :D eval is unable to execute this code because of the comma :/

Replies are listed 'Best First'.
Re^3: comma within array
by choroba (Cardinal) on Jan 05, 2016 at 21:49 UTC
    You haven't shown the relevant part of the code. I can run it without problems, with your join and with my double quotes:
    #!/usr/bin/perl use warnings; use strict; my @names = qw( John Jane Jake ); my @arrayCode = do { no warnings 'qw'; qw( $cn=join(",",@names); print@names; ) }; for my $ac ( "@arrayCode", join q(), @arrayCode ) { my $cn; eval "$ac; 1" or die $@; print $cn, "\n"; }
    ($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,
Re^3: comma within array
by Anonymous Monk on Jan 05, 2016 at 21:50 UTC

    The eval works fine for me.

    What is the point of this code??