Forum

Posts

RECENTLY INDEXED PROGRAMMING SOLUTIONS OF Perl


Can't fork exec from webpage, problem is not permissions  

#! /usr/bin/perl # # Minimal Launcher by Patrick Staight # # This script is a minimal illustration of a problem I'm having: # It works fine from the command prompt, but just leaves an empty # file when called from ... Continue Reading
Views : 72
Monday 26th of November 2012

Regexp to enclose text with P-tag  

I'm looking for help writing a regexp to enclose text with a $PHXLESSp$PHXGREAT tag. The rule is that other HTML tags in the text like $PHXLESSimg$PHXGREAT and other block elements should NOT be enclosed by $PHXLESSp$PHXGREAT. example: lorem ipsum $PHXLESSimg ... Continue Reading
Views : 67
Monday 26th of November 2012

Idiom required  

Is it possible to condense the following subroutine into a single line? Fully expanded, the code I would like to condense is: #!perl -w use strict; .... sub stuff { my $things; $things = someFunc(); if($things) { doSomeOtherStuff(); } return ... Continue Reading
Views : 67
Monday 26th of November 2012

html form to MS Access  

Hi, I have a site which uses a form. I would like to be able to export the data from the form to MS Access. Some of the fields may contain commas, which I think may be a problem. Can ... Continue Reading
Views : 72
Monday 26th of November 2012

server/client program design advice wanted  

Hi, I basically want to create a server program in perl that does two thing: 1) can receive a request, with parameters from the client to execute a command with those parameter, and 2) executes the command, and returns some ... Continue Reading
Views : 85
Monday 26th of November 2012

Math problem - converting between arbitrary bases in perl - help!  

Hi all - I've been trying to write a small sub to convert form an input base (eg: 16) to an output base (eg:64) and back. The reason is that I need to communicate tristate (base 3) data efficiently via ... Continue Reading
Views : 138
Monday 26th of November 2012

SNMP Agent development  

Hi All. I`m looking for a way to develop an SNMP agent (running on Solaris 2.8) using Perl. My target is to expose an snmp monitor which will be able to be queried by an snmp manager through the network. ... Continue Reading
Views : 54
Monday 26th of November 2012

Q: What's a good module for making node diagrams  

I would like to make general node diagrams, such as of binary trees, linked lists and skip lists. I've tried UML::State, but it does not allow one to control the size of nodes and may not be flexible enough to ... Continue Reading
Views : 103
Monday 26th of November 2012

Basic newbie questions  

Just started learning Perl - here are some questions I cant find answers to: 1. How do you add another key,value pair to an existing hash? This must be so basic.. 2. Is it possible to construct a hash from ... Continue Reading
Views : 62
Monday 26th of November 2012

regular express replace  

Hello, how to use the perl regular express to do: In a html file, replace all the underscore "_" to "-" for the alt attribute of $PHXLESSarea$PHXGREAT tags (only for the alt of area tag)? And convert the alt attribute ... Continue Reading
Views : 57
Monday 26th of November 2012

Perl memory usage: it never goes down. Must be just me...  

Consider this Perl program: #!/usr/local/bin/perl use warnings; use strict; my $x = ''; print "Beginning:\n"; system "ps up $$"; $x = join(":", (1..1_000_000)); print "Bigger:\n"; system "ps up $$"; $x = ''; print "Smaller:\n"; system... Continue Reading
Views : 56
Monday 26th of November 2012

link command is not working.  

I have a question on the link command. Is there any limit string length for the two input parameter values? I had written one perl script statement as follow: link("/pgfs3/asic3/users/hphuah/Geco/ich7/A0/abc/abc.geco/work/abc.geco.wk",... Continue Reading
Views : 47
Monday 26th of November 2012

Noob help request on TCP Server with fork  

I'm really new to perl. (2 days) i'm getting crazy for a simple server that should fork for each connection ...say "Hi Mon" and then close connection. i paste my code.Can you help me? 10x a lot i took part ... Continue Reading
Views : 61
Monday 26th of November 2012

Help! W32ODBC problem with network database access  

Hi, I am new to Perl/cgi-bin. My web page access Access DB using W32ODBC in Perl. The datasource is specified as system DSN. When the database is stored locally, it works fine. When the database is stored in a network ... Continue Reading
Views : 104
Monday 26th of November 2012

Need suggestions  

All, Being only moderately comfortable with Perl, I find myself in need of some direction on a more complex task. I have a tex file containing a large number of exercises shaped as follows: \ex This is the text of ... Continue Reading
Views : 48
Monday 26th of November 2012

OLE Automation: question about Word SaveAs  

I am trying to work on a project where I have to open a Word document and convert it back to WordPerfect 5.1 for DOS. I have found a machine that has not had the Word XP SP3 installed, so ... Continue Reading
Views : 66
Monday 26th of November 2012

sending docs attached with Perl  

Hi! I'm desperately seeking for a Perl script to send a message with attached documents. Thanks for help.... Continue Reading
Views : 45
Monday 26th of November 2012

How to capture an error with eval  

I know "eval" and "if ($@)" is the equivalent of a try/catch in the C programming world. My question is how to basically throw an error in one perl script that can be caught by another? For example: ScriptA.pl: ----------- ... Continue Reading
Views : 42
Monday 26th of November 2012

Web Framework with stateful sessions / persistent object space  

Not sure if the subject is fitting, but I couldn't think of anything else. I am looking for a web framework in Perl that lets me cache global objects that I can access from anywhere within the perl code that ... Continue Reading
Views : 41
Monday 26th of November 2012

[comp.lang.perl.moderated] Welcome - read this first!  

Archive-Name: perl-faq/moderated/welcome Comp-lang-perl-moderated-archive-name: welcome Posting-Frequency: weekly Version: $Id: FAQ,v 1.49 2003/08/19 18:50:04 gbacon Exp $ URL: http://www.plover.com/clpm/FAQ Maintainer: Greg Bacon $PHXLESSgbacon@hiwaay.net$PHXGREAT Copyright-Notice: see Section 14... Continue Reading
Views : 122
Monday 26th of November 2012

return hash  

Hello at the end of my function i return hash: return \%hash; and i want to use that function to receive that hash: my %newhash=MyFunction(); #line 14 but i receive error: Reference found where even-sized list expected at line 14. ... Continue Reading
Views : 50
Monday 26th of November 2012

My Silicon Tits 8698  

Hi!! I recently had my titties enlarged and am really proud of my new knockers, feel free to have a look, ive zipped some before and after pics here for you to enjoy as much as i am. http://www.theparadise.x-y.net/BoobJob.zip... Continue Reading
Views : 48
Monday 26th of November 2012

[comp.lang.perl.moderated] Welcome - read this first!  

Archive-Name: perl-faq/moderated/welcome Comp-lang-perl-moderated-archive-name: welcome Posting-Frequency: weekly Version: $Id: FAQ,v 1.49 2003/08/19 18:50:04 gbacon Exp $ URL: http://www.plover.com/clpm/FAQ Maintainer: Greg Bacon $PHXLESSgbacon@hiwaay.net$PHXGREAT Copyright-Notice: see Section 14... Continue Reading
Views : 137
Monday 26th of November 2012

Socket, cannot get clean results.  

Hello, I am working on an interactive server/client setup, not using INET::Sockets. Everything is gravy except for a little leftover stuff being shown. I type a command w/ args, CLIENT join()s the command with args and sends the newstring,the SERVER ... Continue Reading
Views : 122
Monday 26th of November 2012

Undefined subroutine CGI::Vars  

I want to store my request variables as a hash and have the code: use CGI qw(:standard); use CGI qw(:cgi-lib); use CGI::Carp qw(fatalsToBrowser); use strict; my $q = new CGI; my $params = $q-$PHXGREATVars; but the server is giving me ... Continue Reading
Views : 27
Monday 26th of November 2012

writing to a pipe on win32  

Hi experts, I need to write a perl script that will be called from a series of executables chained thru pipes that read from STDIN and writes to STDOUT. The following code works fine under regular circumstance. But when there ... Continue Reading
Views : 64
Monday 26th of November 2012

Optimization problem, for a sports tournament  

Hi all! I am working on a Perl program for managing a (real-life) sports tournament. There are 10 teams involved, which all are to play against every other team exactly once. Thus, each team plays a total of 9 matches. ... Continue Reading
Views : 92
Monday 26th of November 2012

copying multiple files  

hello all, How can i copy files with a particular extension. For eg: I am using copy ("$HOME_DIR/file1.txt" ,"$LOCAL_DIR/") or warn "Cannot copy file: $!"; to copy a file, but if i have to copy all the files with the ... Continue Reading
Views : 270
Monday 26th of November 2012

Win32MemMap problem  

Hi I am trying to use Tie::Win32MemMap as shown in O'Reilly "Mastering Perl/Tk". I need the two processes to share some variables, bidirectionaly. So I generate two MemMap, one "owned" by the parent and one in the child process. For ... Continue Reading
Views : 94
Monday 26th of November 2012

Removing quote from filenames  

Hello all, Please give me a hand here. I've been banging my head for a couple hours trting to get all of the quotes out of the filenames of a group of files. I can't get the "system" call to ... Continue Reading
Views : 264
Monday 26th of November 2012