#! /usr/bin/perl use strict; my $input; while (<DATA>) { ($input) = /(\w+)/; print "\$input=$input\t\$1=$1\n"; } __DATA__ Hello World
Output:
$input=Hello $1=Hello $input= $1=Hello $input=World $1=World
In reply to Re: = rather than =~ ?
by inman
in thread = rather than =~ ?
by bcrowell2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |