in reply to Re: Transforming only parts of input
in thread Transforming only parts of input
There's nothing in my code that violates strict, so I don't know why that would presumably be a problem. Try
perl -Mstrict -wne'print "$1\n" while /\B(-I\S+)/g;' infile which is the same asAs a minor point, you preferrably want to split on \s+.#!/usr/bin/perl -w use strict; while(<>) { print "$1\n" while /\B(-I\S+)/g; }
Makeshifts last the longest.
|
|---|