Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: To initialise or not to initialise?

by bradcathey (Prior)
on Jun 24, 2004 at 13:34 UTC ( #369352=note: print w/replies, xml ) Need Help??


in reply to Re^2: To initialise or not to initialise?
in thread To initialise or not to initialise?

Precisely, thanks for clearing up the terminology. And I have to apologize for not being about to think of a good example, but I have found at times I need the undefined variable, as opposed to the defined, inferring a value.

—Brad
"Don't ever take a fence down until you know the reason it was put up. " G. K. Chesterton
  • Comment on Re^3: To initialise or not to initialise?

Replies are listed 'Best First'.
Re^4: To initialise or not to initialise?
by kiat (Vicar) on Jun 24, 2004 at 13:52 UTC
    Ah okay.

    I thought it might be something to do with concatenation at first, which also shows a subtle difference:

    my $var1; print $var1 .= 'r', "\n"; # prints r my $var2 = ''; print $var2 .= 'r', "\n"; #prints r my $var3 = 0; print $var3 .= 'r', "\n"; #prints 0r
    :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://369352]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (None)
    As of 2021-10-20 05:55 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      My first memorable Perl project was:







      Results (79 votes). Check out past polls.

      Notices?