Forum

Posts

RECENTLY INDEXED PROGRAMMING SOLUTIONS OF Perl


Adding nt user to global group  

I can't understand why I cant add users to a group using this script. If I change the Netadmin line to read GroupIsMember instead of GroupAddUsers, I can check if the user belongs to a group. the error message I ... Continue Reading
Views : 171
Monday 26th of November 2012

simple timer for win32, solaris and linux  

I'm trying to implement a simple timer to work on win32 (98,2k,xp), solaris and linux. where the last two are simple, the first seems to be problematic. the problem is that the kill command seems to always fail. the pid ... Continue Reading
Views : 122
Monday 26th of November 2012

Simple syntax question(MULTIPOST)  

Hello I have a simple syntax question : What does the following line mean: 1: %checkType; ?? I know that @test="" is an array and $test="" is a simple variable. Thank you With best regards Trimbitas Sorin... Continue Reading
Views : 76
Monday 26th of November 2012

Anyone have the unpack template for utmp on HPUX  

Does anyone have a working unpack template for the utmp file on HPUX? I've figured out the Solaris and AIX templates but I just can't get the HPUX one working. Searches of past usenet posts have come up empty.... Continue Reading
Views : 63
Monday 26th of November 2012

Process string.  

Hi all, I am new to perl language and need someone to help me. If I have three sentenses. Too good to be true. It is raining today. They wanted the meeting to be on Thursday. If I want to ... Continue Reading
Views : 61
Monday 26th of November 2012

perl 5.8.2/3 - thread started by a thread  

Hello everyone, I'm a perl beginner. I created a piece of code starting a first thread which in turn creates a second thread. Unfortunately the creation of the second thread hangs the first one. Is there anybody who knows what's ... Continue Reading
Views : 214
Monday 26th of November 2012

Inheritence question  

I have a program where I create an class and pass a hash: x.pm package x; sub new { my $object = shift; my $self = ((@_ == 1) ? shift(): { @_ }); return (bless $self, $object); } 1; ... Continue Reading
Views : 69
Monday 26th of November 2012

very strange conditional failure  

I just finished debugging a very strange problem, and was wondering if any of you had ever seen it before. My code is very long, so I will only post the interesting parts. ok, so using DBD::Sybase and some other ... Continue Reading
Views : 136
Monday 26th of November 2012

Re: How to Tie Existing File to Hash  

I have a 150k line file that I am trying to convert to a hash. Each line has a number, e.g. first line has 50000000, last line has 50149999 The message I get is basically, I am running of shared ... Continue Reading
Views : 54
Monday 26th of November 2012

How to Tie Existing File to Hash  

Does anyone know how to tie a large existing file(each record is a 8byte number) to a Hash using IPC::Shareable? Any Code fragments would be most helpful. thanx, greg... Continue Reading
Views : 63
Monday 26th of November 2012

RegExp Replace Using a Variable  

Hi all: I'm trying to replace using a regexp read from a file: $string = '123 456 789'; # these two are usualy read from a file, # and so have to be in variables. $re = '([258])'; $rep = ... Continue Reading
Views : 65
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 : 205
Monday 26th of November 2012

assigning back to an array  

I have files that I only need one field that I need to grep it out and I am trying to assign that to another file. (It happens that one field that I am looking for has some other character ... Continue Reading
Views : 58
Monday 26th of November 2012

Socked not valid - how to check it  

Hi all! I've got a problem - probably easy to solve but I practically don't know Perl nor modules so it's hard for me. The problem concerns two processes communicating via sockets. I need to know that one of them ... Continue Reading
Views : 82
Monday 26th of November 2012

Interesting VI, Perl problem  

Hello all, here is an interesting VI problem: I opened a perl script in VI and, forgetting to hit 'i' to get into insert mode, I just started typing away. Unfortunately the text I need to insert was this (I ... Continue Reading
Views : 147
Monday 26th of November 2012

>$filename") what is the rong with that">open (FAILEHANDLER, ">>$filename") what is the rong with that  

Dear perl experts, I used to use[ open (FAILEHANDLER, "$PHXGREAT$PHXGREAT$filename");] to open and add new lines to $filename, but it didn't work any more. The perl version is 5.8.1. When I try [ open (FAILEHANDLER, "$PHXGREAT$filename");] it's work but the ... >$filename") what is the rong with that">Continue Reading
Views : 211
Monday 26th of November 2012

MQSeries::Command  

can some one help me get started with this module, it appears that it very difficult to work with; all I am wanting to do is connect to local QManager and inquire Queue's QDepth. Any help is kindly appreciative... Continue Reading
Views : 41
Monday 26th of November 2012

plxpcom  

Can anyone provide any insight into the current status of PLXPCOM. I've looked on mozdev, but it appears that the project is relatively inactive. I would be interested incontacting anyone that has used PLXPCOM. R... Continue Reading
Views : 62
Monday 26th of November 2012

Re: How do you unbless  

Tim Heaney $PHXLESStheaney@cablespeed.com$PHXGREAT wrote in message news:$PHXLESS87ekrs1a7z.fsf@mrbun.watterson$PHXGREAT... $PHXGREAT persicom@acedsl.com (Matthew Persico) writes: $PHXGREAT $PHXGREAT $PHXGREAT $PHXGREAT In theory, the solution is the unbless function. In practice, I didn't... Continue Reading
Views : 83
Monday 26th of November 2012

Reading the name of a file in a .gz  

Hello, I need to read the name of a file inside a .gz. I know it should be the zipped name - .gz, but the filenames are long and truncated sometimes. In perl, what is the command to read the ... Continue Reading
Views : 401
Monday 26th of November 2012

How do I find my runtime directory  

This seems like a simple thing, but I can't find anything in the "Perl Cookbook" or the online Perl docs to answer this. When a script runs from my host's server, the working directory doesn't appear to be the directory ... Continue Reading
Views : 92
Monday 26th of November 2012

Confused on using basename...  

I have an online ftp type website for a customer that I wrote in a cgi perl script. If the person is trying to upload a file that already exists on the server I am printing a message telling them ... Continue Reading
Views : 166
Monday 26th of November 2012

LWP::Simple and utf8 problem  

Hi, I want to retrieve a webpage that includes unicode characters using the LWP::Simple module. But how can I tell LWP::Simple which coding it should use as I haven't found anything concerning coding in the docs. I use the following: ... Continue Reading
Views : 146
Monday 26th of November 2012

File handle behaviour within objects  

I am writing a Perl prgram that makes use of objects. Within the _init routine of my object I: open FH, "$PHXGREATmyfile.$name" or die(...); # I have a number of these E.g. FHA, FHB... FH-$PHXGREATautoflush(1); # To ensure there's only ... Continue Reading
Views : 144
Monday 26th of November 2012

Correct use of Unicode in RegExp  

I am having great difficulty using Unicode characters in a Regular Expression, I am trying to match extended Unicode characters. I am wishing to split a large Dumpfile (containing only JPEGS) I have used a hex editor to manually extract ... Continue Reading
Views : 149
Monday 26th of November 2012

Polskie fonty w Perl/tk  

Napisalem programik w Perl/Tk pod windows. We wszystkich widgetach u?ywam czcionki - "Arial 10 bold". Odpalaj?c go pod WinXP wszystkie polskie znaki sa prawidlowo wy?wietlane. Je?eli za? uruchomi? go na platformie WinNT 4.0 to w?wczas nie mam polskich znak?w. Jak ... Continue Reading
Views : 72
Monday 26th of November 2012

Printing on a printer with tractor feed under win32 - question  

Has anyone done it successfully. I'm trying to use Win32::Printer module but creating new pages doesn't feed the paper in desired amount, missing next forms. (custom paper size defined both in Win printer properties and Win32::Printer object) I'd grateful for ... Continue Reading
Views : 189
Monday 26th of November 2012

Strange problem with next exiting sub instead of for loop  

Hello, I've run into a strange issue with a 'next' exiting the sub (with a warning) instead of the 'for' loop. This is happening in 5.8.3 and didn't happen with the same code in '5.8.0' or '5.8.1'. The other really ... Continue Reading
Views : 150
Monday 26th of November 2012

FormMail.pl error  

I keep getting the error "Error: Bad/No Recipient" when submitting a form using formmail.pl Here is the part of the formmail.pl that you are supposed to alter to suit your needs using fake url and ip addresses: #!/usr/bin/perl... Continue Reading
Views : 71
Monday 26th of November 2012

Urgente.  

Necesito limitar el acceso a una p?gina web de forma que s?lo se pueda hacer desde otra p?gina web concreta que redirecciona a esta. Osea: Si el navegador quiere ver la p?gina http://xxx.xx.xx/contenido.html , es necesario que haya entrado por ... Continue Reading
Views : 66
Monday 26th of November 2012