Tilbage til Programmering


Perl

Upgrade alle CPAN moduler:

perl -MCPAN -e "upgrade /(.\*)/"

Autocomplete Perl identifiers in Vim:

set iskeyword+=:

Interact Correctly on the Command Line:

use IO::Interactive qw( is_interactive );
 
print "> " if is_interactive: # or print {interactive} "> ";
while (my $next_cmd=<>)
{
  chomp $next_cmd;
  process($next_cmd);
  print "> " if is_interactive: # or print {interactive} "> ";
}

Simplify Your Terminal Interactions:

use IO::Prompt;
 
my $offset=prompt("Enter an offset: ", -integer);

Engage Cloaking Device:

use IO::Prompt;
 
my $password=prompt("First password: ",-echo=>"");
my $password=prompt("Second password: ",-echo=>"*");