My Code:
--
#!/usr/bin/perl -w
use strict;
my $text= 'hello';
my $text2 = 'bye';
my $text3 =~ s/$text/$text2/g;
print $text3;
My Error:
---
F:\perlex\findpara.pl line 5.
Use of uninitialized value in print at F:\perlex\findpara.pl line 6.
My Questions:
On Oct 13, Dave Adams said:
my $text= 'hello';
my $text2 = 'bye';
my $text3 =~ s/$text/$text2/g;
print $text3;
What are you expecting to happen? There is NOTHING in $text3, so trying
to substitute all "hello"s for "bye"s will result in Perl telling you that
you're using an uninitialized val
t sounds like you
haven't gotten the hang of the s/// operator. You might want to reread
the section of 'perldoc perlop' about "quotes and quote-like operators".
-Original Message-
From: Dave Adams [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 13, 20