Try this for a start?
#!/usr/bin/perl use strict; use warnings; use v5.10; open my $FILE ,"makefile.txt"; my $accum=""; while(<$FILE>){ chomp; if(s%(.*?)\\$% %){ $accum.=$1; } else { $accum.=$_; $accum=~s/\s+/ /gs; say $accum; $accum=""; } }
In reply to Re: Breaking up a text file to make a Makefile
by bitingduck
in thread Breaking up a text file to make a Makefile
by flybd5
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |