[PLUG] shell scripting question

Randal L. Schwartz merlyn at stonehenge.com
Wed Oct 20 09:41:02 UTC 2004


>>>>> "Colin" == Colin Kuskie <ckuskie at dalsemi.com> writes:

Colin> while (<>) {
Colin>   tr/ / /s;
Colin>   @columns = split;
Colin>   @columns = @columns(1,7,8); #Check for 0 based indexing versus 1 based

This is a syntax with which I'm not familiar.  Are you sure you didn't
mean @columns[1,7,8]?

Colin>   ##Do what foo.pl does here
Colin>   print join ',', @columns;
Colin> }


-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



More information about the PLUG mailing list