Hello Monks,
I want to execute a command using open which is using "|" inside it. Sample command is "ls -ltr /tmp | wc -l".
i wrote the simple codes as below.
#!/usr/bin/perl use warnings; my $cmd = "ls -ltr | wc -l"; open (CCCC, "$cmd |") || die "Failed: $! \n"; close CCCC;
and now i get a exception "Broken pipe". Can someone help me with it.
In reply to execute a command using OPEN by kaka_2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |