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...
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
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...
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
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...
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...
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...
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
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
Hi,
Try implementing the following in your code:
my $line = "aatgatgataaggtaaggtatgatgatgatgatgatagtagannnnnnnnnatgcatga'/atgca.atgactagca/atgactagcaaggtaaggtaaggtaaggtaaggtatgatgatgannnn./atgatgactagactgacaaggtaaggtaaggtatgatgatgatcgatgacgat";
my $count1 = 0;
while ($line =~...
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
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...
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...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.