Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: One Liners

by davido (Archbishop)
on Jan 11, 2005 at 06:43 UTC ( #421204=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -e "print qq/Hello world!\n/;"
    
  2. or download this
    perl -n -e "print qq/$.:\t$_\n/;" textfile.txt
    
  3. or download this
    while ( <> ) {
        ..........  # Your code goes here.
        print $_;
    }
    
  4. or download this
    perl -pe "s/\bperl\b/Perl/g;" textfile.txt
    
  5. or download this
    perl -pe "s/\bperl\b/Perl/g;" textfile.txt >temptext.txt
    
  6. or download this
    perl -pi.bak -e "s/\bperl\b/Perl/g" infile.txt
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://421204]
help
Chatterbox?
[arunks]: do you have any sample code .please share it. am looking for before opening excel file prompt should ask for password to open the excel file.
[marto]: which part don't you know how to do?
[marto]: oh
[Corion]: arunks: Maybe How do I make password prompts not echo back the user?? Or simply read it from STDIN.
[Corion]: arunks: Please do not ask us to write your program. You have to write your program yourself.

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (12)
As of 2017-01-20 14:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (174 votes). Check out past polls.