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!

Search results for query: *

  • Users: tonykent
  • Content: Threads
  • Order by date
  1. tonykent

    sort by hash key before printing

    Last year feherke kindly helped me resolve a problem with printing a complex data structure. I have found the resultant script enormously helpful since then. An influx of work since the corona lockdown has left me with a need to slightly modify the print routine. I have received a number of data...
  2. tonykent

    Assistance with printing complex data structure

    Given this data structure, can anyone help me print it out in the format shown below? $VAR1 = { 'DepartureTime' => '05:53:00', 'PrivateCode' => '4483928', 'VehicleJourneyTimingLinkRef' => { '7' => 'PT1M16S'...
  3. tonykent

    Split long string into hash pairs

    After a long time away from perl I have found myself in a new job where I need to use it again (to manipulate lots of xml files). Hello again! My problem: After some data extraction with XML::LibXML I am getting long strings of text returned, like this: 4541 PT1M27S 4542 PT1M51S 4543 PT2M16S...
  4. tonykent

    Use of uninitialized value in string

    It's been a while but I'm hoping one of you helpful guys can help me out again. I'm trying to debug a 3000 line script written by a.n.other. When run it is throwing up dozens of warnings like this one: Use of uninitialized value in string ne at ./ccrscript line 1528 The section of the script...
  5. tonykent

    makefile question

    Can anyone tell me why this gmake makefile works: LIST1 := `ls` # inside a rule: first line starts with a TAB, all the rest are spaces all: @for x in `ls`; do echo $$x ; done outputs: check.txt inc.mk makefile subdir but when I try to replace the 'ls' command with the...
  6. tonykent

    I wasn't sure where this really str

    I wasn't sure where this really strange problem should best be raised, but as it's related to my Xubuntu laptop I thought I'd start here. I have an XP laptop (supplied by my employer) that I use to connect to their network via VPN when I'm out of the office. This works fine where ever I connect...
  7. tonykent

    RHEL5 Automatic Partitioning

    I have just installed RHEL 5 for the first time on a new machine. Having used the 'Automatic Partitioning' option during installation I have been surprised to discover upon completion that other than the swap partition (LogVol00) it has allocated all the remaining disc space (1.6 terabytes) to a...
  8. tonykent

    browser connection timing out

    Happy New Year to one and all. I was working on this problem last year and still haven't managed to resolve it. Can anyone here suggest a possible solution? I'm currently producing an automated build deployment tool for the developers I support. This will allow them to produce a release...
  9. tonykent

    need to make code snippet recursive

    Can anyone help me make this script recursive? It's defeating my limited scripting ability so far. I'm trying to get a directory listing out of an informix database (note, this is not an actual file structure so I can't just glob the files or do a 'dir' etc). The following code does give me...
  10. tonykent

    Can a reg ex do the job?

    Can anyone come up with any ideas for adressing this issue? I've been asked to produce some figures from my Change Request database, including how many Change Requests went through peer review but subsequently failed testing, and this one has me stumped. I have pulled out the raw data, thus...
  11. tonykent

    remove but count duplicates in a list

    If I have got a list containing lots of duplicated entries that I want to remove I often use while (<DATA>) { chomp; $line=$_; $seen{$line}++; } @unique = keys %seen; foreach $entry(@unique) { print "$entry\n"; } This is quick, short and easy. However, what if I want to remove the...
  12. tonykent

    Module recommendations?

    Morning all. I have some data analysis to do and don't want to reinvent the wheel so I thought I would ask to see if anyone knows of any existing module(s) that can do all or part of the job. I have a large list consisting of a task name(type), with its corresponding start date/time and end...
  13. tonykent

    Accessing elements of data structure

    I am having difficulty accessing the lowest elements of this data structure: $VAR1 = { 'MoveCompletedEndsBack' => '0', 'NewTasksEstimated' => '1', 'Resources' => { 'Resource' => [ {...
  14. tonykent

    complex data sort

    In an effort to answer a serious question about the usage of some of the data in one of the databases I administer I have used perl to pull out almost 37,000 lines of information and have manipulated those lines to remove non-essential information. What I am now left with looks like this...
  15. tonykent

    Print duplicates from hash

    Hello again, I have several lines of data that I am reading into a hash, as per the code below. I would like to print out only those lines where the key is duplicated. The key, in this case, is the data in the first TWO columns on each line (for example '310715 W'): #!/usr/bin/perl use strict...
  16. tonykent

    Problems installing XML::Parser

    Has anyone had experience of installing XML::Parser with perl 5.10.0? I am having no joy with it at all. XMP::Parser requires expat to be installed first. I have done this successfully (at least it did not throw up any errors). I then create the XML::Parser makefile with: Makefile.PL...
  17. tonykent

    returning second numeric entry from ls

    I have a shell script to modify that was produced by a.n.other. If it was perl I could do it with no problems, but my shell scripting knowledge is not up to the task. I think I'll need to use awk, hence this posting. I have a directory, the top few entries in it being subdirectories called...
  18. tonykent

    uninstall NT application

    Can anyone point me to a module that will enable me to uninstall a Windows NT application using perl? The app in question installs from an msi but refuses to uninstall except through the add/remove software feature in the control panel (i.e. it won't uninstall from the commandline using msiexec...
  19. tonykent

    array sorting syntax question

    Can someone assist me with getting the correct syntax to sort this array please? I've tried all sorts and searched past threads but have not found the right answer. I have a very complex and lengthy script that queries a database and eventually ends up with me having data in this format (this...
  20. tonykent

    regex for duplicates

    This is entirely an academic question. A guy asked me if it was possible to produce a regex to find duplicate words in a sentence. "Easy" I said......and I've now spent about 3 hours getting nowhere! Can anyone help? Using this sentence: this is some text with some duplicate words this is We...

Part and Inventory Search

Back
Top