in reply to Re^5: read an integer from a file
in thread read an integer from a file
#!/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 } }
|
|---|