#!/usr/bin/perl -- use strict; use warnings; use autodie; use 5.010; $| = 1; while (<>) { open my $fh, "<", "status.txt"; my $status = join "",<$fh>; close $fh; my $url = ( split )[0]; if( not $status # almost same as if( $status == 0 ) and $url =~ /\Q123.1.34.107:8080\E/ ) { say "301:http://123.1.34.107:8080/Web" } else { say $url } }
In reply to Re^6: read an integer from a file
by Anonymous Monk
in thread read an integer from a file
by long
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |