Thanks TrojanWarBlade. How would I find the DHCP server? I work at a university and they are pretty strict with how they handle their servers. Would they really let me poke around their server with a script that ran every day?
Hi, where I work we are collecting info on our computers, and one thing we require is a listing of the latest IP addresses assigned to the users’ machines. They are mostly set to DHCP, so the idea I had was to check each machine every day with a script that would find their IP addresses, and...
Paul, thanx for the reply. I had some help with it and it turns out that the code needed to be changed a bit. Here is a solution that worked:
#!/usr/bin/perl
use strict;
use warnings;
use CGI;
use CGI::Carp qw/fatalsToBrowser/;
my $q = new CGI;
print $q->header('text/plain');
#input XML...
I have a perl file that contains some regular expressions, and I want to make it into a CGI script. Can something like this run on the web so that when the user points to it with their browser it will execute the perl file and deliver the results of the search and replace? Every time I try it...
suppose i have the string: "iX... iY... iX... iY"
and i want to replace all occurrences of iX with "i1" and all occurrences of iY with "i2", yielding "i1... i2... i1... i2"
how can i do this with a single regular expression that will also replace the string
"iY... iX... iY... iX" with the string...
i wish to say thanks to everyone who replied. it turns out that i got help on this since my last post. It appears that there is a number of ways to solve this problem; which i did not know since i am not fluent with regexes at all, as you can see. thanx again.
Yes, thank you both for your reply. But, perhaps i should have been clearer on my intent here. i want to match the above mentioned text so that i can strip IT away from all the text that is within parentheses. How would i do this? i was asking how to merely select the text which is not in...
i am trying to use a regular expression to match all characters that are NOT enclosed within parentheses. I have tried the following, among others, on the file:
[^(\(.*\))]
[^\(+[A-Z]+.+[a-z]\)]
so i am trying to use the "not" operator [^ ] to select all characters that are not within the ( )...
I want to express my gratitude for all of your replies, it really helped. It appears there are many ways to do one task. I now have a great head start on my projects, thanks to you all. 2thumbsup
Thank you for your responses.
PaulTEG, Ok, how do I invoke grep on a Windows machine?
mikevh, where would I place the name of the talk.txt file that I need to search in?
Greetings, this is a newbie question: I need to know how to tell perl to use a regular expression on a text file and print the results. If I have a file "talk.txt" and I want to match all the strings, "abc" in that file, how do I tell perl to use the regexp on talk.txt? How...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.