Search Results

Search: Posts Made By: doubando
Forum: Programming 07-17-2011
3,044
Posted By bartus11
It can be done, but it is not pretty...
It can be done, but it is not pretty :)$ip=~/\b((2[0-5][0-5]\.)|(1?[0-9]?[0-9]\.)){3}((2[0-5][0-5])|(1?[0-9]?[0-9]))\b/
Forum: Programming 07-17-2011
3,044
Posted By bartus11
You can try...
You can try this:$ip=~/(\d+)\.(\d+)\.(\d+)\.(\d+)/;
if ($1>=0 && $1<=255 && $2>=0 && $2<=255 && $3>=0 && $3<=255 && $4>=0 && $4<=255)
{
}
16,519
Posted By itkamaraj
if ($input =~ /\015\012/) On most...
if ($input =~ /\015\012/)



On most operating systems, lines in files are terminated by one or two characters that signal the end of the line. The characters vary from system to system. Unix...
16,519
Posted By getmmg
Remove the chomp part. $input = <STDIN>; ...
Remove the chomp part.
$input = <STDIN>;
then if ($input =~ /\n/) should work.
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 01:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy