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 strongm 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. parkers

    trying to switch between product lines in DBI command

    Hi, Change the connect string to: $dbh = DBI->connect("DBI:Oracle:host=$dbsys; sid=$dbsys", "procure", "procure90") or die "$DBI::errstr"; Variables are taken literally within single quotes and don't evaluate. Thanks, Steven Parker...
  2. parkers

    Arrays and Perl!

    arun10427, What you are asking would involve a more involved algorithm that would look forward to the next x values rather than the next value. This is hard to specify as I am not sure of your full requirements. Thanks, Steven Parker www.stevenp1974.co.uk
  3. parkers

    Arrays and Perl!

    Zhris, In response to your question to feherke, $p isn't a special variable (you can declare this as you wish) $p= $_ || $p what this does is take the value of the current iteration variable ... if this is zero, undef or similar it will default to the previous value. In this instance. 100...
  4. parkers

    textbox value being filled with the php script

    No worries, I hope your now up and running. Thanks, Steven Parker www.stevenp1974.co.uk
  5. parkers

    Client program in perl

    Hi, As a starting point please have a look at IO::Socket If you have any difficulties from there then someone should be able to help. Thanks, Steven Parker www.stevenp1974.co.uk
  6. parkers

    Help with stdout.... in perl..

    Hi, $fecha is returning a date string OK, however you pass this by reference. Simply changing \$fecha to $fecha should fix this issue (although I did notice that this line was commented out in the above example). One reason I can think why you are receiving messages outside the redirected...
  7. parkers

    textbox value being filled with the php script

    Hi, The problems you observe would indicate that the web server does not know how to parse the file correctly. The most obvious place to start would be to check if your web server is configured to run php? ... and secondly with the file extension and path where the file exists. Thanks...
  8. parkers

    Using DBI:CSV to get data from a CSV file

    Great, I'm glad all is now well. Steven Parker www.stevenp1974.co.uk
  9. parkers

    Method chaining in php5

    Agree that this is useful to know and would like to add that method chaining can make code more compact and robust. As a simple example: $object->methodA()->methodB(); The key is to return $this from methods "methodA" and "methodB". Any method that returns the object is suitable for...
  10. parkers

    Using DBI:CSV to get data from a CSV file

    Hi, You were nearly correct... simply changing the foreach to a while will fix the problem. Thanks, Steven Parker www.stevenp1974.co.uk
  11. parkers

    Regular expression subsitute

    Hi, This should work: my $str = "3.5.4 (en-US)"; $str =~ s/[^\d\.]//g; We're effectively replacing anything that doesn't either match a digit or period Thanks, Steven Parker www.stevenp1974.co.uk
  12. parkers

    Perl regex --need help

    or as implemented within your code: #!/usr/bin/perl $count1 = 0; open (FILE, "INPUT") || die "cannot open $!\n"; while ($line = <FILE>){ while ($line =~ s/((aaggt){2})(.{100})?//) { ++$count1; } print "count1 \t " ,$count1 , "\n" ; } } Steven Parker www.stevenp1974.co.uk
  13. parkers

    Perl regex --need help

    Hi, Try implementing the following in your code: my $line = "aatgatgataaggtaaggtatgatgatgatgatgatagtagannnnnnnnnatgcatga'/atgca.atgactagca/atgactagcaaggtaaggtaaggtaaggtaaggtatgatgatgannnn./atgatgactagactgacaaggtaaggtaaggtatgatgatgatcgatgacgat"; my $count1 = 0; while ($line =~...
  14. parkers

    link combo boxes

    I would just like to comment as I've had similar thoughts / problems in the past as Jason, the solution you suggest is very clean and concise ... I will definently use this! Thanks Phil! Steven Parker www.stevenp1974.co.uk
  15. parkers

    SSL confusion

    Hi, This is OK and you can be confident that all transactions will be secure over this protocol. Your apache server will be instructed to listen on port 443 for requests - it does not necessarily need to be on a different server or subdomain. To prevent port 80 access to parts of the site that...
  16. parkers

    Counting consecutive array elements from array

    Hi, I've had a quick play and think something like this would be what you are looking for: #!/usr/bin/perl use strict; my @array = (1,1,1,1,1,1,2,1,1,1,3,3,1,1,1,1,1,2,2,2,3,4,5,8,9,9); my $consecutiveItems = []; my $consecutiveHash = {}; my $lastElem = undef; my $count = 0; # gather...
  17. parkers

    Need a translation program

    nice solution Trojan ! This is an interestng contrast actually ... string manipulation vs mathematical
  18. parkers

    Need a translation program

    interesting example netman4u ... ideal for utilising binary logic... I've implemented via a mapping hash so the following code, although not perfect, will be scaleable: #!/usr/lib/perl use strict; # binary mapping for Sunday - Friday # the end result will be translated # y =1 and n = 0 my...
  19. parkers

    Sockets? returning multi-line data from server?

    note: noticed a typo ... any reference to $new_sock should actually be $sock_handle
  20. parkers

    Sockets? returning multi-line data from server?

    Hi, I've just started looking at Sockets as a method of getting data from one server to another. My setup is relatively simple having a client and server system. The client sends commands to the server over TCP and ideally should receive multiple lines worth of data back for processing. The...

Part and Inventory Search

Back
Top