Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Active STDIN for user typed filepath

by furry_marmot (Pilgrim)
on Mar 30, 2012 at 06:11 UTC ( [id://962537]=note: print w/replies, xml ) Need Help??


in reply to Active STDIN for user typed filepath

Works fine for me. It's not in Perl, it's in the shell. I've been doing this with Windows since Win95. Edit your registry and add the following:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor] "CompletionChar"=dword:00000009 "EnableExtensions"=dword:00000001 "PathCompletionChar"=dword:00000009

CompletionChar refers to a file. PathCompletionChar refers to a path (duh...). 9 is the ASCII code for <tab>. Change as you like. Enabling Extensions gives you some additional shell functionality. It is limited compared to bash, etc., but the shell can be made to be bearable.

You can save that block of text to a file with a .reg extension and just run it. If you have admin rights on your box, it will update the registry. Then run this and see if it works.

perl -e "$x = <STDIN>; print $x"

Press tab at the command prompt and it will cycle through files and paths.

--marmot

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-25 20:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found