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
  • 124,803
  • 31
  • 200
  • 568
neversaint
  • 55,647
  • 127
  • 291
  • 457

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
  • 28,163
  • 13
  • 72
  • 98