Hi,
I have this simple grep-like program:
1 #! /bin/env perl
2 use warnings;
3 use strict;
4 #use re 'debug';
5
6 print "Enter a pattern:";
7 chomp (my $input=<STDIN>);
8
9 @ARGV=$0;
10 #print "input=$input.\n";
11 while (<>)
12 {
13 print if /$input/;
14 }
15 #input
When I give the input: "$input" (without the quotes) it finds nothing. But
when I give "\$input" it finds all "input", even in line 15.
What is going on ?
Yossi
_______________________________________________
Perl mailing list
[email protected]
http://mail.perl.org.il/mailman/listinfo/perl