Advertisement
Guest User

preprocesa.pl

a guest
Apr 10th, 2013
2,536
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.36 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. my @fichero0;
  4. open (file,"<@ARGV[0]");
  5. while (<file>) {push (@fichero0,$_);}
  6. close (file);
  7.  
  8. my @fichero1;
  9. foreach (@fichero0)
  10. {#por cada linea leida
  11.         $_ =~ s/; /;\n/g;
  12.         $_ =~ s/ {/\n{\n\t/g;
  13.         $_ =~ s/} /}\n/g;
  14.         push (@fichero1,$_);
  15. }
  16.  
  17. open (out, ">out.php");
  18. print out $_ foreach (@fichero1);
  19. close (out);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement