Simple Substition Question

2005-10-13 Thread Dave Adams
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:

Re: Simple Substition Question

2005-10-13 Thread Jeff 'japhy' Pinyan
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 hellos for byes will result in Perl telling you that you're using an uninitialized value

RE: Simple Substition Question

2005-10-13 Thread Timothy Johnson
/// 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, 2005 11:51 AM To: beginners perl Subject: Simple Substition Question My Code