maybe you need to use an array instead of a scalar for capturing the reults:
my @result = $t->cmd(("grep - $filename.txt~ | wc -l | awk '{print $1}'"));
Reputation Points: 246
Solved Threads: 67
Practically a Posting Shark
Offline 898 posts
since Mar 2006