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: Perl Programming Help: Intermediate: Re: [gevni] Problem in regular expression!!: Edit Log



FishMonger
Veteran / Moderator

May 22, 2013, 11:03 AM


Views: 1103
Re: [gevni] Problem in regular expression!!

gevni,
please post beginner questions like this in the Beginner section.


Code
#!/usr/bin/perl	 

use strict;
use warnings;

open my $exec_fh, '<', 'my_file.csv' or die("Could not open 'my_file.csv' $!");
open my $out_fh, '>>', 'new.csv' or die "Could not open 'new.csv' $!";

print $out_fh grep { /^[^.]+\.java/ } <$exec_fh>;



(This post was edited by FishMonger on May 22, 2013, 11:14 AM)


Edit Log:
Post edited by FishMonger (Veteran) on May 22, 2013, 11:14 AM


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

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