#!/usr/bin/perl use strict; use warnings; $| = 1; while ( defined( $_ = <ARGV> ) ) { my @X = split( " ", $_, 0 ); my $url = $X[0]; open( MYFILE, 'status2.txt' ) or die "Couldn't open file!"; my $a = <MYFILE>; close(MYFILE); print "$a\n"; if ( $a == 0 ) { if ( not $url =~ m[^http://123.1.34.107:8080] ) { $_ = $url; s[^http://(.*)(.*)][http://123.1.34.107:8080]; print "301:$_\n"; } else { print "$url\n"; } } }
In reply to Re: read an integer from a file
by Khen1950fx
in thread read an integer from a file
by long
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |