Search Results

Search: Posts Made By: anspks
4,165
Posted By anspks
Birei, It works when i put this is unix prompt...
Birei,
It works when i put this is unix prompt but its not working inside a perl script,


#!/usr/bin/perl
use strict;
use warnings;
print `perl -lane 'print(@F[0..2]) if grep(/abc/, $_)'...
4,165
Posted By anspks
perl oneliner not works .pl script
I am trying to take first 3 columns in a file which matches the word "abc", but i am getting the below error,
<error>
Global symbol "@F" requires explicit package name at ./new.pl
</error>
...
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 01:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy