how to fix "uninitialized value in subsitution" warning

2002-09-07 Thread pelp
Hi - I'm unsure of how to patch the following warning message, "Use of uninitialized value in substitution (s///) at work.pl line 74" Here's my code: #!/usr/bin/perl use strict; user IO::File; my $FILE = new IO::File; my $change_on = "/FChangeBar Yes/"; my $change_off = "/FChangeBar No/";

Re: how to fix "uninitialized value in subsitution" warning

2002-09-07 Thread Bob Showalter
- Original Message - From: "pelp" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, September 06, 2002 7:26 PM Subject: how to fix "uninitialized value in subsitution" warning > Hi - > > I'm unsure of how to patch the following warni

Re: how to fix "uninitialized value in subsitution" warning

2002-09-09 Thread drieux
On Friday, Sep 6, 2002, at 23:26 US/Pacific, pelp wrote: > > my $change_on = "/FChangeBar Yes/"; > my $change_off = "/FChangeBar No/"; > > > $FILE -> open(">test.mif") or die "can't open file"; > > while ($FILE) > { >if ($change_on) >{ > s/$change_on/$change_off/; given that you ha

Re: how to fix "uninitialized value in subsitution" warning

2002-09-09 Thread Michael Fowler
On Mon, Sep 09, 2002 at 03:06:06PM -0700, drieux wrote: > > On Friday, Sep 6, 2002, at 23:26 US/Pacific, pelp wrote: > >my $change_on = "/FChangeBar Yes/"; > >my $change_off = "/FChangeBar No/"; [snip] > > s/$change_on/$change_off/; > > given that you have the "/" elements in the variables,