Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners > Re: $^I
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 11055 of 11520
Post > Topic >>

Re: $^I

by rich.japh@[EMAIL PROTECTED] (Richard Lee) May 11, 2008 at 09:25 PM

Chas. Owens wrote:
> On May 11, 2008, at 18:04, Richard Lee wrote:
>
>> I just looked it up on perldoc perlvar, but I am still not sure what 
>> it does.
>>
>>
>>
>> $^I     The current value of the inplace-edit extension.  Use "undef" 
>> to disable inplace editing.  (Mnemonic: value of -i
>>             switch.)
>>
>> I was reading perl cookbook and saw this example, and was wondering 
>> what that is....
>>
>>
>> if (@[EMAIL PROTECTED]
) {
>>  $^I = ".orig";
>> } else {
>>   warn "$0: Reading from stdin\n" if -t STDIN;
>> }
>
>
> Setting $^I turns on in-place-editing*.
>
> * http://perldoc.perl.org/perlrun.html#*-i*[_extension_]
>
> -- 
> Chas. Owens
> wonkden.net
> The most im****tant skill a programmer can have is the ability to read.
>
thanks, after reading that I ran the file and now I understand. thanks!!

 51817 -rw-r--r--  1 root  root       409 2008-05-12 05:35 yahoo.orig
 51812 -rw-------  1 root  root      4472 2008-05-12 05:35 .viminfo
 51690 -rw-r--r--  1 root  root       410 2008-05-12 05:35 yahoo
 49153 drwxr-x--- 31 root  root      4096 2008-05-12 05:35 .
[root@[EMAIL PROTECTED]
 ~]# cat yahoo.orig
analysed   =>  analyzed
built-in   =>  builtin
chastized  =>  chastised
commandline => commnad-line
de-allocate => deallocate
dropin   =>  drop-in
hardcode => hard-code
meta-data => metadata
multicharacter => multi-character
multiway => multi-way
non-empty => nonempty
non-profit => nonprofit
pre-define => predefine
preextend => pre-extend
re-compiling => recompiling
reenter => re-enter
turnkey => turn-key
[root@[EMAIL PROTECTED]
 ~]# cat yahoo
analyzed   =>  analyzed
builtin   =>  builtin
chastised  =>  chastised
commnad-line => commnad-line
deallocate => deallocate
drop-in   =>  drop-in
hard-code => hard-code
metadata => metadata
multi-character => multi-character
multi-way => multi-way
nonempty => nonempty
nonprofit => nonprofit
predefine => predefine
pre-extend => pre-extend
recompiling => recompiling
re-enter => re-enter
turn-key => turn-key
 




 3 Posts in Topic:
$^I
rich.japh@[EMAIL PROTECTE  2008-05-11 18:04:48 
Re: $^I
chas.owens@[EMAIL PROTECT  2008-05-11 18:20:26 
Re: $^I
rich.japh@[EMAIL PROTECTE  2008-05-11 21:25:05 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 13:17:06 CDT 2008.