Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

search position is getting reset after 'local'

by jesuashok (Curate)
on Jun 12, 2006 at 11:31 UTC ( [id://554784]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    $x = "123 56"; 
    ...
    print "$x, ", pos($x), "\n";
    { local $x }
    print "$x, ", pos($x), "\n";
    
  2. or download this
    123 56, 4
    Use of uninitialized value in print at l.pl line 5.
    123 56,
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-26 07:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found