CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
How to print textfile content in perl output

 



vikasmetla
Novice

Apr 29, 2014, 9:03 PM

Post #1 of 2 (25107 views)
How to print textfile content in perl output Can't Post

hi perl guru's

i want to print a text file content on perl's output .in perl program i will use some regular expression but it could not change in text file .. .and print the perl output..with changing output.

ex:
textfile:
a1,b1,c1
a2,b2,c2

i will change it to
o/p:-

a1 and b1 and c1
a2 and b2 and c2
this output should will be in only in perl but not in text file ..the text file should remain same..


plz help me


FishMonger
Veteran / Moderator

Apr 30, 2014, 7:07 AM

Post #2 of 2 (24993 views)
Re: [vikasmetla] How to print textfile content in perl output [In reply to] Can't Post


Code
$line =~ s/,/ and /g; 
print $line;


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives