2

Why does this line of Perl break?

system("paste <\( cut -f2 $file \) $file2 > $fileout");

What's the correct way to do it?

brian d foy
  • 129,424
  • 31
  • 207
  • 592
neversaint
  • 60,904
  • 137
  • 310
  • 477

1 Answers1

5

This is generally caused because Perl is using sh instead of bash to execute the system command. The quick answer is to include bash -c at the start of your command. A better answer is here:

How can I use bash syntax in Perl's system()?

Community
  • 1
  • 1
brianegge
  • 29,240
  • 13
  • 74
  • 99