Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: User input at runtime

by vivid (Beadle)
on Dec 13, 2007 at 05:12 UTC ( #656752=note: print w/replies, xml ) Need Help??


in reply to User input at runtime

Try this

use strict; my $arg = $ARGV[0]; open(IN,"$arg")||die("Can't open the input file for reading"); undef $/; my $str = <IN>; close(IN); $/="\n"; print ("\nDo u want to Change Example to Uppercase:"); $value = <STDIN>; chomp($value); if ($value=~/^y$/){ $str=~s/\b(example)\b/uc($1)/gei; } open (OUT,">$arg")||die("Can't open the output file for writing"); print OUT $str; close(OUT);

Vivid

Replies are listed 'Best First'.
Re^2: User input at runtime
by pop18 (Novice) on Dec 13, 2007 at 05:53 UTC
    Thank you very much VIVID...
    This stuff works as per my requirement....

    Thanks
    POP
      This doesn't bode well for your High School midterm...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://656752]
help
Chatterbox?
[holli]: the chatterbox xml ticker only deleivers fresh data to each client
[holli]: i mean, once you requested it and got the new chatter, the chatter won't appear in the next request
holli keeps hacking along

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2017-09-23 11:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (272 votes). Check out past polls.

    Notices?