Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

splitting file into multiple files

by Anonymous Monk
on Mar 03, 2016 at 15:38 UTC ( #1156736=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hey, I have a very long input file which

>id_1 some text... >id_1_2 some text..

I want to split every, bock of information along with > >id_1 some text... in the above format into a new file. Meaning there should be n new files for n > and i use ">" as pattern to split the file sections. for every ith > i want the name of the output file to be "id_name" from the first line of the file. Thanks for helping!

Replies are listed 'Best First'.
Re: splitting file into multiple files
by toolic (Bishop) on Mar 03, 2016 at 15:47 UTC
    • Read perlintro.
    • Write some code.
    • Post back here if you have specific questions about your code.
Re: splitting file into multiple files
by poj (Abbot) on Mar 03, 2016 at 16:41 UTC
Re: splitting file into multiple files
by neilwatson (Priest) on Mar 03, 2016 at 16:18 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1156736]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (1)
As of 2021-10-20 22:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (82 votes). Check out past polls.

    Notices?