I write the following script
#!/usr/bin/perl
system(" awk -F"=" '{s[$1]++}{print $1s[$1],$2}' OFS="=" /var/tmp/file " );
when I run the script I get:
Can't modify string in scalar assignment at ./stam2 line 5, near "" /var/tmp/file " )"
Execution of ./stam2 aborted due to compilation errors.
what the problem here?
lidia
• the target of the script is to manipulate and add numbers after each parameter in line
You’re executing a statement that has the equals sign in it, as part of a system() call, which you can’t do.
I suspect this might be what you want: