Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl -w
- use strict;
- my ($input1, $input2) = @ARGV;
- open( INPUT1, $input1 );
- open( INPUT2, $input2 );
- while( my $input1_line = <INPUT1> )
- {
- if( $input1_line =~ m|<source>| )
- {
- while( my $input2_line = <INPUT2> )
- {
- if( $input2_line =~ m|<source>(.+?)</source>| ) {
- $input1_line =~ s|<source>.*?</source>|<source>$1</source>|;
- last;
- }
- }
- }
- print $input1_line;
- }
- close( INPUT1 );
- close( INPUT2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement