Hello,
Here is part of code:
print "Podaj sciezke do pliku bazy, ktory archiwizujemy: ";
chomp( $question2 = <STDIN> );
As a reply to this question user need to specify full file path e.g. /opt/databases/demo/file.abc I`m looking for some way to have interactive shell just like in linux shell - is there any way to have autoexpanded paths after tab pressing?
In Linux we just type e.g /opt/dat , pressing TAB and it prompt us the full path /opt/databases/, but when it is typed under running Perl script the TAB don`t work.
I`ve tried a bit with
Term::ReadLine but i didn`t give me what I need.
The Term:ReadLine way:
$| = 1;
use Term::ReadLine;
my $Term = new Term::ReadLine 'Installer';
my $file = $Term->readline('Enter a file path: ');
print "$file = '$file'n";
Will be nice to have it working in Linux and ActivePerl on Windows - all of used by me modules works on both Win and Lin platforms so i think some module will be the best way.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.