Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. carlosAlberto

    Perl CGI - Parsing a HTML form

    Hi all, I'm using the cgi-lib.pl file to parse the data submitted from my HTML form. The variables returned are $input{'nameOfFormItem'} The dilemma i face is: the posted data will only return - $input{'mibOid'} OR $input{'mib'} I would like to test which one does actually hold a...
  2. carlosAlberto

    Pattern matching problem

    Thanks. Can you briefly explain this line (what does the 10 signify): n = parseInt(s[x],10); Does this mean i can remove this line now??? !s[x].length from the condition if... || ... || Carl.
  3. carlosAlberto

    Pattern matching problem

    Thanks Guys, I've implemented the answer Jemminger gave and works fine. However......... There is still a problem. It accepts characters.... (I presume it's taking the ascii value if between 1-255). Is there a function to check for an integer ???? Thanks again. Carl.
  4. carlosAlberto

    Pattern matching problem

    Hi all, I have a piece of code that checks if a value entered is a valid IP address. I split the address into four part, which each part should be from 1 - 254. This is the code where i actually check the value: if (thisSegment < &quot;0&quot; || thisSegment > &quot;254&quot;) { I have an...
  5. carlosAlberto

    Pattern matching problem

    Actually.... please ignore the above. I have narrowed it down to: if (thisSegment < &quot;1&quot; || thisSegment > &quot;254&quot;) { thisSegment holds the value 3. This loops through 4 times. If i remove the OR statement it seems to work. Is there something wrong with the above.
  6. carlosAlberto

    Pattern matching problem

    Hi all, Having a few problems regarding the folowing pattern matching code: var ipV4Pattern = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/; var ipArray = IPvalue.match(ipV4Pattern); if i have IPvalue equal to 3.3.3.3 or 4.4.4.4, it places the value of ipArray to 3.3.3.3,3,3,3,3 &...
  7. carlosAlberto

    open files for reading from another server

    Sounds great guys. Thanks!!!!!!
  8. carlosAlberto

    open files for reading from another server

    Jim, I was trying to keep it as simple as possible. I thought it might of been possible to use the open command with the name of another server. i.e. open (INFILE, '10.10.10.2' '/files/mse.xml'); (I know the above line is VERY wrong, i thought it may help for demonstration) ;-) Any...
  9. carlosAlberto

    open files for reading from another server

    Hi all, Is is possible to open a file for reading that is located on a different linux server????? Thanks, Carl.
  10. carlosAlberto

    Desktop Firewalls

    Hi, Slightly going off track for a second.... I have installed Zone Alarm earlier today and had already been notified of 6 attempted attacks (3 hours!). In the alert log it logs the IP address of the attempted attacker. How is it possible to find out where this address originates ??? for...
  11. carlosAlberto

    Executing unix commands from a Perl file

    I have the following piece of code to assigned the $snmpCommand variable. if ($miboid =~ /Table$/) { my $snmpCommand = &quot;snmptable -v 3 -Os -u $userName -a MD5 -A $authPass -l authPriv -x DES -X $privPass -CB $ipAddress $miboid |&quot;; } else { my $snmpCommand =...
  12. carlosAlberto

    Executing unix commands from a Perl file

    I'm actually 'printing' the $snmpCommand variable which is exactly correct. I have copied it straight to the command line and ran fine. But for some reason the open () is dieing....... Carl.
  13. carlosAlberto

    Executing unix commands from a Perl file

    Jaa, Yep, the other variables are assigned first. I don't have any warning declarations... Is there 1 of the 2 i should be using do you think???? Thanks. Carl.
  14. carlosAlberto

    Executing unix commands from a Perl file

    Perl v5.6.1 Redhat 7.3
  15. carlosAlberto

    Executing unix commands from a Perl file

    ooooops, not sure what happened there.... yes sorry, I've actually tried both ways. I'll just include the lines i'm having problems with again: my $snmpCommand = &quot;snmpwalk -v 3 -Os -u $userName -a MD5 -A $authPass -l authPriv -x DES -X $privPass $ipAddress $miboid |&quot;; open...
  16. carlosAlberto

    Executing unix commands from a Perl file

    yes sorry, I've actually tried both ways. I'll just include the lines i'm having problems with again: my $snmpCommand = &quot;snmpwalk -v 3 -Os -u $userName -a MD5 -A $authPass -l authPriv -x DES -X $privPass $ipAddress $miboid |&quot;; Search Find A Forum Keyword Search Find An...
  17. carlosAlberto

    Executing unix commands from a Perl file

    Hi, I tried the previous comment with no success. Here are my commands: my $snmpCommand = 'snmpwalk -v 3 -Os -u $userName -a MD5 -A $authPass -l authPriv -x DES -X $privPass $ipAddress $miboid |'; open (RESULTS, $snmpCommand)
  18. carlosAlberto

    Nagging Subroutine

    From your example above - sub no jpg; { !system(&quot;unzip -qq fff.zip *.txt *.rpt&quot;) or die(&quot;can't unzip zip file: $!&quot;); } sub no jpg; - remove the ';' should do it. Agree with changing the elseif too, good programming practice. Carl.
  19. carlosAlberto

    Executing unix commands from a Perl file

    Hi Mike, Thanks for the reply. I tried that and that doesn't seem to work. I also tried creating a variable as: my $command = '$snmpCommand -v 3 -u testUser -l noAuthNoPriv $ipAddress $miboid | '; open (RESULTS, $command); which also didn't work. ???? Carl.
  20. carlosAlberto

    Executing unix commands from a Perl file

    oh I define the variable as follows, just in case my ($snmpCommand) = snmpwalk;

Part and Inventory Search

Back
Top