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 Wanet Telecoms Ltd 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: sdslrn123
  • Content: Threads
  • Order by date
  1. sdslrn123

    Exiting out of a loop?

    Getting a bit stuck. Would appreciate any help? Thanks I have a list of names. Each name corresponds to a profile on a txt document. Each txt document profile contains a section called address I am only interested in those names that are in Texas as well as those specifically in Austin...
  2. sdslrn123

    LWP::Simple Module (Check content or die)

    use LWP::Simple; open (HELLO, ">>thanks.txt"); foreach $person (@group) { my $url = "http:domain/$person.txt"; my $content = get $url; print HELLO $content; @group contains list of names. Hi there. The file from the website contains lots of details but I am just interested in the line that...
  3. sdslrn123

    What is this doing?

    What is the last line doing? I understand the rest? Where did $families come from? while(<SARACEN>) { chomp; my ($family, $people) = split (/=/, $_); my @members = (split /,\s*/, $people); foreach my $member (@members) { push @{$people{$member}}, $family...
  4. sdslrn123

    What does the following mean?

    print FILE if ++$count{$_} < 2; Does anyone know what is being printed to the filehandle FILE?
  5. sdslrn123

    Calculating Percentages in a Hash?

    Is there a way to calculate the total number of terms altogether within arrays of a hash. I know I have to divide the following scalar but I can't figure out how to group the total number of "family members" in all the "families" of the hash. print "$member can be found " ...
  6. sdslrn123

    Counting the matching terms of arrays within a Hash

    Basically my data is subject to change but will follow a format as follows where I will have a unique "Family Name" followed by "--" followed by various "family members". The contents of the data are unknown to me apart from the format: Data is a text file as follows: FLINTSTONES=BARNEY...
  7. sdslrn123

    Converting from Row to column

    A = 1 A = 2 A = 3 B = 5 B = 1 B = 7 e.t.c C = ..... Is there a way to convert this format to: A = 1,2,3 B = 5,1,7 C = ... . . . Z = ... I am thinking while in data file split each line to letters and numbers. if next letter matches previous letter push into an array otherwise create a...
  8. sdslrn123

    Counting but with two columns

    #!/usr/bin/perl @foo= ("apple","orange","pear","pear","mango","apple"); for (@foo) { $bar{$_}++; } while ( ($k,$v) = each %bar ) { if ($v =~ 1){ print "$k appears $v time\n"; } elsif ($v !=~ 1){ print "$k appears $v times\n"; } } The above code works nicely with a one column set of...
  9. sdslrn123

    How to create an array of numbers from 001 - 500

    The 001 element (3 figure configuration is important. Is this possible without having to type out all the numbers? I have tried @nums = (001 .. 500) with no success.
  10. sdslrn123

    Using CGI with Windows?

    Does anyone know have tips on how I can go about doing this?
  11. sdslrn123

    Opening a File on a Website in Text Format?

    This is more a thought exrcise than anything as I am trying to understand how Perl interacts with web. If I have a website with a list of film titles -each film title when clicked opening upto a new page --each page contains info about film as well as a link to a text document with the script...
  12. sdslrn123

    Printing Output To An Array

    How does one print/capture output to an array?
  13. sdslrn123

    Matching lines in a list?

    Matching lines in a list? Title says it all. I know I can do the perl (with lots of research and hard graft!) if I just know how to tackle the dilemma. If I have a list: John Eric David Paul John Eric Harris Eric [\code] and I want to print out: [code] John 2 David 1 Paul 1 Eric 3 Harris 1...
  14. sdslrn123

    Use of Uninitialised Value In Split

    Hi again. For those who know me you'll be gald to know I solved the other problem.... :) But, now I have a new one. However, although the program works this line is giving me errors: @host = split(';',$guests[0]); "Use of uninitialised value in split" What is wrong? I have declared my @host...
  15. sdslrn123

    syntax of one line split? correct? Incorrect?

    I am trying to split files with ';###KW' (NOT INCLUDING SINGLE QUOTES) @finalcount = split (';###KW',$secondstring); Is this right? (It isn't because I have tried. Why?)
  16. sdslrn123

    Concatenate one string to another?

    This is related to the following thread but I was told once before that if I have a new query, I should put it in a new thread. http://www.tek-tips.com/viewthread.cfm?qid=1236725&page=1 I believe I can solve the problem originally posted in the thread above if anyone has any ideas on how I...
  17. sdslrn123

    Foreach Reading within file

    Okay this is complex. But, if you have the patience just to nudge me in the right direction. I know I am close... I have a file. Format of file is: Line starts with ST: SIGNAL_NAME1, SIGNAL_NAME2 . . . Line starts with YZ: WO RD 1, WO RD 2, WO RD 3, WO RD 4, Line starts with YZ: WO RD 5, WO...
  18. sdslrn123

    Grabbing contents of 2 matched lines to store in separate file

    Hi. I am reading through a file: A - B - C - D - E - F - word; word; word; F - word; word; finalword; G - H - I am trying to grab the contents in both F lines. At the moment I've got #!/usr/bin/perl foreach $line (@data) { if ($line =~ /^F/) { $goodline = $line; $goodline =~ s/F//g; #take...
  19. sdslrn123

    code works but not with use strict...

    This code works without the strict function but I was just wondering can anyone work out why it won't work with the "use strict" function? #!/perl/bin/perl -w use CGI; $query = CGI::new(); $text1=$query ->param("intext"); $pattern=$query ->param("pattern"); print $query ->header(); print...
  20. sdslrn123

    Matching Pattern to string of letters

    Hi there. If you can help you are a star. I want user to: Enter text into box A Enter a pattern into box B Box B is matched against the text in Box A. Believe it or not, I know how to do the above! But, I am getting stuck on a configuration of this cgi program. I need to configure the...

Part and Inventory Search

Back
Top