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 Mike Lewis 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: *

  • Users: three
  • Order by date
  1. three

    Using Perl to ping specific port eg SMTP

    thanks for taking the time to explain your script!
  2. three

    Using Perl to ping specific port eg SMTP

    thanks, now I am not clear on how this part works? What is the $socket=IO::Socket::INET ->new(%host) part doing?? And what does ${host}:${port} represent??, Are these aliases?? if($socket = IO::Socket::INET->new(%host)){ print "Connected to $host on port $port\n"; print...
  3. three

    Using Perl to ping specific port eg SMTP

    How would you do the same thing in checking several IP addresses?? I tried putting the $host variable in an array but couldnt get it to work. @host = "111.111.111.111 454.333.335.333 334.333.334.333"; # or an IP address
  4. three

    Regexp help?

    Please advise what \r stands for??
  5. three

    reporting disk usage with df -vk command

    Greg, I tried running your script and got the following messages: Checking File Systems Mount Total Used Free Used% Test diskmon: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xx: not found awk: syntax...
  6. three

    New to solaris and need disk info

    Please explain what RAID is and what they do? Are they just big storage devices that are hooked up to servers???
  7. three

    File Manipulation/Parsing in Perl.

    I got the output I wanted and was wondering it this is the best way to do it?? $db = 'aaa.txt'; open(FILE, &quot;$db&quot;) or die &quot;File does not open: $!&quot;; while(<FILE>) { if ($weight = (/\b(weight)(\s+)(\d+)/)) { print $1 . $2 . $3; } } close FILE;
  8. three

    File Manipulation/Parsing in Perl.

    Still no luck I tried: print $weight; print $_; print FILE; and none of the above printed out weight 2. MOst of the print outs were of the whole file such as: --- Garbage Line --- and has weight 2kg with blah blah --- Garbage Line --- Any other suggestions??
  9. three

    File Manipulation/Parsing in Perl.

    Please advise how I would print results to the screen? I can only get it to print the whole file contents instead of printing out the variable and number 2. $db = 'tex.doc'; open(FILE, &quot;<$db&quot;) or die &quot;File does not open: $!&quot;; #@data = (<DATA>); #close (DATA)...
  10. three

    matching digits and adding tabs to each line of a file

    Thanks for the detailed answers.
  11. three

    matching digits and adding tabs to each line of a file

    1 012345 Literature Book Pkged with Audio $var =~ s/\A(\d+) +(.*)\Z/$1\t$2/; Please explain what this is doing? It is starting with beginning of string (which is the number 1?) and then what is the +(.*) doing? I know the \Z is ending the string. But what part of the string is it ending??
  12. three

    skip blanks, colons, and /

    Still not familiar with the passing of references. I will need to start reading about references and structures.
  13. three

    skip blanks, colons, and /

    Can you advise what the $a and $b represent in this script. I understand the splitting up of data and sorting but I am lost with these two variables. Are you storing the three fields in each one? @field1 = split (/\s+/,$a); @field2 = split (/\s+/,$b);
  14. three

    Scripting recommendations

    Thanks for explaining the details about C++ and Perl. I am just learning both and just wondering what other Perl and C++ books you recommend? Also how many years did it take for you to get comfortable with both languages? I tried the Learning perl and perl cookbook but want something with...
  15. three

    Scripting recommendations

    I am in the process of learning Perl and C++. Can you use Perl alot with Windows? And can you use C++ and Perl in Unix environment. If so how would the two differ?
  16. three

    Creating number that increments

    fergmj, Send as much as you can (or edit your corporation words etc.. it if needed) so I can at least understand it. My email is teser3@hotmail.com Thanks!
  17. three

    Creating number that increments

    fergmj, Can you post your script? I need to do the same thing as you are doing.
  18. three

    how to split a line

    Krunek, Please disregard my last question...I might not need to worry about it. Can you explain more about your code such as: length > lnLen { for (i = 1; i <= NF; i ++) { if (i > 1) { row = tmpRow #WHAT IS HAPPENING HERE? tmpRow = tmpRow &quot; &quot; $i #WHAT IS THIS...
  19. three

    how to split a line

    Krunek, Thanks for the explanation. This works great for me, but what if I have HTML tags such as <longtag name that cant be split in two lines> or other tags that I dont want to seperate into two lines. Basically keep all charaters the same length as what you wrote in your awk but leave...
  20. three

    how to split a line

    Krunek, Can you explain what your script does? Three

Part and Inventory Search

Back
Top