Just for fun ;)
#!/usr/bin/perl -w use strict; use autodie qw(open close); { undef $/; my %file = ($1 => split /<\s*(.+)\n/ , <DATA>); map { $_ and open my $fh, q{>}, $_; select $fh; print $file{$_} and close; } keys %file; } __DATA__ < file1.txt line1 of file1 line2 of file1 line3 of file1 line4 of file1 < file2.txt line1 of file2 line2 of file2 line3 of file2 < file3.txt line1 of file3 line2 of file3 line3 of file3 line4 of file3
hth,
PooLpi
In reply to Re: How to generate files based on some special character?
by poolpi
in thread How to generate files based on some special character?
by unix_95054
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |