You are here: Technology, Web & Business Forum
: Web Development
: Programming
:
Perl programming???
|
Welcome to the Technology, Web & Business Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| Programming Discuss programming languages such as .NET, PHP, PERL, ASP, ColdFusion, C++
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
|||
$file = 'C:\PERL\BIN\ABC.XML';
open(INFO, $file) or die "Can't Open the File"; while (<INFO>) { chomp; #works on $_ by default print $_,"\n"; #Don't need the "\n" if you don't chomp if ($_ =~ /Prostate Cancer/) { print "ALRIGHT"; close (INFO); } else { print "NOOOOOOOOOOO"; } } close (INFO); Above program reads the entire file and finds the word /prostate cancer/. However I want to is copy the data of the from the beginning up to the word 'prostate cancer' and save it to another file and th other half to another file. Please help I'm new in perl???
__________________
Powered by Yahoo! Answers |



Linear Mode
