Discussion Locked
0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have a log file of 10 MB size in which i have to find mac- address and there response status.what i do is first search through the file get all the mac -address and response status in a hash table . then i ask input from user for the mac address for which he want to see the response- status. the place where i require help is that how can i compare mac address and also how do i remove single quotes around a string
2 replies
by jaqui
this should help you code the script:
by solrak29
# removing single quotes from a string
# here are some options depending on what you want
# removes all quotes
$quotedstring =~ s/\'//g;
# removes beginning and end quotes
$quotedstring =~ s/^\'//;
$quotedstring =~ s/$\'//;
# comparing mac addresses
# I believe there is a better command
# called exists or something like that.
# but defined should work.
if ( defined $machash{$userrequest} )
{
return $machash{$userrequest};
}
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending
1 helpful
9 replies
Question
Windows and macOS computers becoming slow or unstable after updates - what should I check first
0 helpful
1 reply
0 helpful
3 replies
Discussion
Optimizing WordPress widgets and DOM size
0 helpful
3 replies
Discussion Locked
Best Ways to Improve Website Visibility
0 helpful
5 replies