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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by spalmarez

  1. spalmarez

    Add a new line after a match

    Sort of, After the match of the phone number I want to add the new line so this wouldn't work because it would replace the phone number with new line: perl -pi -e "s/(\d+)\s+\d+-\d\d\d\d)/\n/g" Any other ideas?
  2. spalmarez

    Add a new line after a match

    I would like to add a new line after a match. I know I can edit a file doing a perl -pi -e "s/(\d+)\s+\d+-\d\d\d\d)//g" filename which this would replace the phone number with something but can I add a newline after my phone number or how would I do this in a script? The file is huge. here's...
  3. spalmarez

    I am adding elements to hashes but is not working correctly

    Here is my mold output: MCC ODE SPF Time ODE SPF DTT SPF Time DTT SPF OMS state 80319.1 08/20/05 09:12:43 5350 08/19/05 11:01:31 65535 hearing 80321.1 08/19/05 16:59:01 5439 08/19/05 11:01:31 4320 tracking preferred 80172.1 08/19/05 13:26:41 65535 08/19/05...
  4. spalmarez

    I am adding elements to hashes but is not working correctly

    This is my initial start (main program). The first sub I read a file in: my %hash; &read_file($moves); ##read file In my read_file sub I get my data from my file then I put the data into the hash, which works I don't return the hash: if (defined $_){$hash{$_}++; ---- Here is the sub to...
  5. spalmarez

    I am adding elements to hashes but is not working correctly

    Looks like I am adding the same information in my hash when they should have different information. How do I just the the information I need?: 14014126,80321.1 14014126,80319.1 14014126,80172.1 13996815,81667.1 13996815,81630.1 13996815,81632.1 13996815,81678.1 13996815,81668.1 Here is my sub...
  6. spalmarez

    How can I compare Values from a Hash

    Thanks. I was making it harder than what it was.
  7. spalmarez

    How can I compare Values from a Hash

    I am trying to get the lowest value from my dtt value. I have multiple mcc's. How can I achieve this? Here is my list: MOD,MCC,DTT 13976465,80492.1, 65535 13976465,81402.1, 21600 13976417,80664.1, 65535 13976417,80431.1, 800 $hash{$key}{mcc}{$mcc}=$mcc; $hash{$key}{mcc}{$mcc}{dtt}=$dtt;

Part and Inventory Search

Back
Top