Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
Ranked #4K
~4K People Reached
Favorite Forums
Favorite Tags
perl x 27

24 Posted Topics

Member Avatar for pjrey

you can use a regex to check the incomming posting comments againts a list of words. This is a quick and dirty example. #!/usr/bin/perl use strict; use warnings; my @Blocked_Words = <DATA>; my $Incomming_Comments = "the Fat rat ate the bat and come and join the Hippie's"; my $check = …

Member Avatar for Taywin
0
481
Member Avatar for arishy

Look in to the module WWW::Mechanize use strict; use warnings; use WWW::Mechanize; my $mech = WWW::Mechanize->new; $mech->get("http://url"); my $site = $mech->content; #site saved as html you can also you the module to log you in the site and do things...

Member Avatar for arishy
0
262
Member Avatar for itsmrshow

you'll either have to store the form contents in cookies, sessions or in hidden form feilds and since you only have 3 questions the hidden will be the less work and faster.. as far as jumping back and forth you need to add an element to the url script.pl?current=quest1&next=quest2 then …

Member Avatar for wickedxter
0
229
Member Avatar for abulut

For one thing the array starts a index 0 (zero) so your looping threw one that doesn't exist. Also you need to use the modules strict and warnings to catch more problems... #its really 4 #change the for ($i=0; $i <= 4; $i++){ } for my $each (@sessions){ #..change $sessions[$i] …

Member Avatar for wickedxter
0
178
Member Avatar for Nole_diver

I think it might be easier to use this module.. [Excel::Writer::XLSX](http://search.cpan.org/~jmcnamara/Excel-Writer-XLSX-0.51/lib/Excel/Writer/XLSX.pm) This has alot of functions already....

Member Avatar for wickedxter
0
308
Member Avatar for jam2010

DBD::mysql is a driver that allows you to work with a mysql server and DBI module depends on that driver module...

Member Avatar for techieguy31
0
66
Member Avatar for jaango123

[CODE] my $ip = 'this once was a cat name 204.158.156 but was 69'; $ip =~ /(\d{0,3}\.\d{0,3}\.\d{0,3}\.\d{0,3})/g; print $1; [/CODE]

Member Avatar for wickedxter
0
144
Member Avatar for fredfletcher

[CODE] # START Perl script # get the URL for the Web page that called this script $calling_page = $ENV{'HTTP_REFERER'}; # when the browser is Netscape, the referrer can contain the # and anchor name: REMOVE IT! (eg. http://clf-nsi/w3c.htm#clf) if($calling_page =~ /\(/\w\/)index\.shtml/) { # only take the first part up …

Member Avatar for wickedxter
0
134
Member Avatar for Alek_log

[CODE] #chdir("/ras-events/Emanuila/edrs/") or die "Couldn't open directory"; opendir (DIR, "./ras-events/Emanuila/edrs/") or die "Couldn't open directory"; my @files = readdir(DIR); closedir DIR; $xml = new XML::Simple; foreach my $file (@files) { next unless $file =~ /\w+\.xml/; my $data = $xml->XMLin("/ras-events/Emanuila/edrs/$file"); print STDOUT "$file\n"; print Dumper($data); print STDOUT "Volume: $data->{edrs}->[0]->{edr}->[0]->{volume}\n"; } [/CODE]

Member Avatar for wickedxter
0
231
Member Avatar for iWire
Member Avatar for wickedxter
0
130
Member Avatar for pavan146

[QUOTE=pavan146;1045433]hey can any1 pls tl me hw to work on cgi pgms on windows..m new to ds language,facin a prob durin connectin perl prog throu browser...hw to do dat[/QUOTE] you need a web server like apache running to interact with.

Member Avatar for terrial
0
91
Member Avatar for wonderland

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 [code] print "content-type: text/html\n\n"; [/code] if not add it

Member Avatar for wonderland
0
167
Member Avatar for notuserfriendly

[CODE] 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 ($word1,$word2,$word3) = split(/ /,$line); push @words1, $word1; push @words2, $word2; push @words3, $word3; } [/CODE] try that.....

Member Avatar for 7stud
0
397
Member Avatar for inquisitor71

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.

Member Avatar for wickedxter
-1
183
Member Avatar for terrylau77

[code] #!/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 $top2 = $mw->Toplevel; fill_window($top2, 'Second top-level'); MainLoop; sub fill_window { my ($window, $header) = @_; $window->Label(-text => $header)->pack; $window->Button( -text => 'close', -command => [$window => 'destroy'] )->pack(-side => …

Member Avatar for wickedxter
-1
147
Member Avatar for rayken1

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 if you want to access the $_ variable. [code] while …

Member Avatar for wickedxter
-1
139
Member Avatar for Prakash_8111
Member Avatar for onaclov2000
-1
140
Member Avatar for Vandithar

add this [code] if ($res->is_success) { print $res->content; } else { print $res->status_line, "\n"; } [/code] this was taken from the cpan site on this module.

Member Avatar for KevinADC
0
201
Member Avatar for Amps

look in to this module. [URL="http://search.cpan.org/~ash/TryCatch-1.001001/lib/TryCatch.pm"]TryCatch.PM[/URL]

Member Avatar for Amps
0
130
Member Avatar for rayken1

[code] $string =~ /FT\s*CDS\s*\w+\(join\(.+\)\)/; [/code] try this, it isnt tested.

Member Avatar for rayken1
0
193
Member Avatar for Matrix28

to save data pasted back from sub like that you must save them. [code] my $saved = $Enable->GetField("LINE",\$Line}); [/code] that will captured anything that is returned back from the sub.

Member Avatar for wickedxter
0
89
Member Avatar for affee

try added this above your commented out foreach loop. [QUOTE] my $cgi = new CGI::Simple; [/QUOTE] then replace [QUOTE] my $fieldsearch =param('fieldsearch'); my $fieldvalue = param('fieldvalue'); [/QUOTE] with [QUOTE] my $fieldsearch =$cgi->param('fieldsearch'); my $fieldvalue = $cgi->param('fieldvalue'); [/QUOTE]

Member Avatar for wickedxter
0
131
Member Avatar for maxjackie

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 save the ref. to a string if need be.

Member Avatar for wickedxter
0
167
Member Avatar for Prakash_8111

The End.