I have this script (just copy and paste it into shell)
perl -c <(cat <<'EOF'
#!/usr/bin/perl
while( @mylist>1){
if($i > $initnum) {$i--;}
   {splice( @mylist,1);}
}
EOF
)
On one linux machine, I got /dev/fd/63 syntax OK output, which is ok. But on macbook terminal, I saw this
$ perl -c <(cat <<'EOF'
> #!/usr/bin/perl
> while( @mylist>1){
> if($i > $initnum) {$i--;}
>    {splice( @mylist,1);}
> }
> EOF
> )
-bash: bad substitution: no closing `)' in <(cat <<'EOF'
#!/usr/bin/perl
while( @mylist>1){
if($i > $initnum) {$i--;}
   splice( @mylist
}
EOF
)
My question is why such error. And ideally how to fix it on mac.
 
     
     
    