Forum: Perl 8 Days Ago |
| Replies: 2 Views: 731 my (@words1,@words2,@words3);
open file, "/dir/to/file.db";
while (my $line = <file>){
next if $line =~ /^./;
#this isnt the best way todo this but should work
my... |
Forum: Perl 8 Days Ago |
| Replies: 2 Views: 360 Is the very first line (#!/usr/bin/perl) pointing to the correct folder where perl is stored on the server?
in the first couple of lines of the script there should be a line like
print... |
Forum: Perl 8 Days Ago |
| Replies: 1 Views: 218 you need a web server like apache running to interact with. |
Forum: Perl Oct 4th, 2009 |
| Replies: 1 Views: 462 you can use session cookies, or you can log there ip. I would just use session cookies, and if the person doesnt accept cookies then dont allow them to view page, or something like that. |
Forum: Perl Sep 26th, 2009 |
| Replies: 1 Views: 527 #!/usr/bin/perl -w
use Tk;
use strict;
my $mw = MainWindow->new;
fill_window($mw, 'Main');
my $top1 = $mw->Toplevel;
fill_window($top1, 'First top-level');
my... |
Forum: Perl Aug 22nd, 2009 |
| Replies: 1 Views: 549 well from what i can see is that $_ is a default set variable, but in your case its not being set by perl anywhere b/c you set all your variables up.
you'll might need to rethink your code layout... |
Forum: Perl Aug 13th, 2009 |
| Replies: 5 Views: 1,038 you can try this: open the file, slurp it all in at once and use eval to execute the code. |
Forum: Perl Jul 27th, 2009 |
| Replies: 4 Views: 414 use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
my $counters = {start => 0, end =>5};
REQUESTS:
my $req = $ua->get( 'http://some.web.site');
if ($req->is_success) { |
Forum: Perl Jul 26th, 2009 |
| Replies: 4 Views: 414 add this
if ($res->is_success) {
print $res->content;
}
else {
print $res->status_line, "\n";
} |
Forum: Perl Jul 22nd, 2009 |
| Replies: 4 Views: 417 look in to this module.
TryCatch.PM (http://search.cpan.org/~ash/TryCatch-1.001001/lib/TryCatch.pm) |
Forum: Perl Jul 14th, 2009 |
| Replies: 1 Views: 361 to save data pasted back from sub like that you must save them.
my $saved = $Enable->GetField("LINE",\$Line});
that will captured anything that is returned back from the sub. |
Forum: Perl Jul 13th, 2009 |
| Replies: 7 Views: 693 $string =~ /FT\s*CDS\s*\w+\(join\(.+\)\)/;
try this, it isnt tested. |
Forum: Perl Jul 13th, 2009 |
| Replies: 1 Views: 495 try added this above your commented out foreach loop.
then replace
with |
Forum: Perl Jul 13th, 2009 |
| Replies: 1 Views: 507 try print $res->content; rather then print $res->as_string. The only thing is that, if the post successful then it will retrieve the contents of that whole page as source code (HTML format). you can... |
Forum: Perl Jul 13th, 2009 |
| Replies: 1 Views: 460 |