perladdict has asked for the wisdom of the Perl Monks concerning the following question:
Even i tried to assing this command to variable and tried to execute by system($cmd) still getting the same error, please correct my mistake.#!/usr/bin/perl `perl -ni -e 'print; print "adding value=key\n" if $.==3' myfile.txt`; + #from command prompt its works fine
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem in executing the perl oneliner within the script
by kcott (Archbishop) on Feb 25, 2014 at 08:48 UTC | |
by perladdict (Chaplain) on Feb 25, 2014 at 12:26 UTC | |
by kcott (Archbishop) on Feb 25, 2014 at 16:57 UTC | |
by 2teez (Vicar) on Feb 25, 2014 at 13:32 UTC | |
by kcott (Archbishop) on Feb 25, 2014 at 16:09 UTC | |
|
Re: Problem in executing the perl oneliner within the script
by 2teez (Vicar) on Feb 25, 2014 at 08:39 UTC | |
|
Re: Problem in executing the perl oneliner within the script
by Anonymous Monk on Feb 25, 2014 at 08:22 UTC |