Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Active STDIN for user typed filepath

by furry_marmot (Pilgrim)
on Mar 30, 2012 at 06:11 UTC ( #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.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://962537]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2018-06-18 19:34 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (110 votes). Check out past polls.