Good call.. use warnings; use strict; Too bad it took me 3 years to learn the benefits of using that and making it a good habit to start all my programs with it.
> -----Original Message----- > From: Jonathan E. Paton [mailto:[EMAIL PROTECTED]] > Sent: Monday, April 01, 2002 4:14 PM > To: [EMAIL PROTECTED] > Subject: Re: Increment a Variable > > > > It could be my code. > > It is, trust me. > > > I am using the variable to write to an > > Excel file in which I want to increment > > the cell from A1 to B1 to C1, etc. > > > > Generalising your code: > > > $x="A"; > > for (0..3) { > > $cell="$x1"; > > print $cell . "\n" > > $x++; > > } > > And what do you get? > > By any chance is it: > > Use of uninitialized value at - line 3. > > Use of uninitialized value at - line 3. > > Use of uninitialized value at - line 3. > > > since you ARE USING the -w flag for perl, AREN'T YOU? :P > > The problem is the "$x1", since perl is trying to use a > variable $x1, not $x. You need to use > "${x}1" or $x . "1"; > > Jonathan Paton > > __________________________________________________ > Do You Yahoo!? > Everything you'll ever need on one web page > from News and Sport to Email and Music Charts > http://uk.my.yahoo.com > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > ---------------------------------------------------------------------------- -------------------- The views and opinions expressed in this email message are the sender's own, and do not necessarily represent the views and opinions of Summit Systems Inc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]