Re: [Perl-unix-users] which ways I can get perl module for signle user to Unix hosting?

2010-01-24 Thread Bill Luebkert
Alexander Bubnov wrote: > Hello, all! > I am using hosting under FreeBSD 4 machine, but unfortunately, that > hosting has not got necessary perl module for me called Encode and as > expected that hosting has not got any compilers. Can you please find out > ways to install Encode perl module ther

Re: [Perl-unix-users] perl script to manage video stream and network traffic

2010-01-03 Thread Bill Luebkert
Dan Jablonsky wrote: > hi all, > I have the following situation that I need to manage: > one network that includes > 1. one Belkin N 1 Vision wireless router > 2. one windows box > 3. one ubuntu 9.10 box > 4. one video streaming box > > The video streaming box is getting video streams form some ur

Re: [Perl-unix-users] LWP gets stuck while using GET

2009-11-27 Thread Bill Luebkert
nonlin wrote: > Dear Sirs, > > I am having problem with LWP. > > I wrote a script that talks from server to another script on another > sever, thought HTTPS and to the IP address not a domain. > > If I use the POST method. my_fist_script $req = HTTP::Request->new(POST > => $destanation_url

Re: [Perl-unix-users] Permistion Problem when run from the Web

2009-11-03 Thread Bill Luebkert
nonlin wrote: > Dear Friends, > > I know this is not directly a Unix problem but since this is happening > in Fedora Lenix I though your the best group to help me with this Issue. > > I need to execute some root level UNIX commands and access some root > level files from an script that is exe

Re: [Perl-unix-users] XML Parse Error

2009-10-12 Thread Bill Luebkert
Jonathan Dudson wrote: > > no element found at line 1, column 0, byte 0: > > at > /usr/lib/perl5/vendor_perl/5.8.8/i586-linux-thread-multi/XML/Parser.pm > line 187 Run the below code and data and see if you get a different result - if so, we can talk about versions and platforms etc: Ran the

Re: [Perl-unix-users] Perl to print results in html page

2009-04-27 Thread Bill Luebkert
Saravanan Jothilingam wrote: > Hi, > > I am a beginner to perl. I have a requirement for my project, to print > success/failed results of my automation suite in *_html page_*. > > It will be grateful, if anyone could share me the code if you have any. Assuming you're talking a CGI script (calle

Re: [Perl-unix-users] Filesystems

2008-10-12 Thread Bill Luebkert
Phillip Bruce wrote: > Hi, > > I'm trying to write a checklist program that verify's configuration in > my environment. > > One of the things I need to check for is owner and group permission for > oracle which > is oracle:dba. > > If you had this task to verify the filesystem using perl how w

Re: [Perl-unix-users] WHISK perl program Part 1( need help to run it )

2008-05-23 Thread Bill Luebkert
James T. wrote: > Hello there, > > Please help !!! I'd start by recoding it with use strict and use warnings. That should keep you busy for a spell. :) ___ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe: http:

Re: [Perl-unix-users] Random number

2008-01-30 Thread Bill Luebkert
Gary Yang wrote: > Hi, > > I need to get a random number whenever the perl script is called. Each > time the random number I got should be different. I use that number to > name generated files, i.e. I want the perl script to generate different > file names whenever it is called. Can someone

Re: [Perl-unix-users] Parse CSS in perl?

2008-01-28 Thread Bill Luebkert
Ben Eagle wrote: > Bill, > > That deffently would be a option for more advanced users but I was > trying to make it some what easier for the beginner. > I made a form that passes all the values to a Perl script and the Perl > script places the values in a css string and then prints it into a css >

Re: [Perl-unix-users] Parse CSS in perl?

2008-01-27 Thread Bill Luebkert
Ben Eagle wrote: > Whats the best way to parse CSS, > I am trying to make a Perl form that will allow users to edit a current CSS > file > > I looked at the CSS module on CPAN but the document tation is vague, > does aqny one have an example of this?? What sort of editing did you have in mind ?

Re: [Perl-unix-users] Prompt to enter password. How to make entered password invisible?

2008-01-27 Thread Bill Luebkert
Gary Yang wrote: > Hi, > > The script bellow prompt user to enter login password. But, when I enter > the passwd at prompt, it shows me the passwd I typed. How to make the > passwd invisible while I'm typing the passwd? > > print "\nPlease Enter login passwd: "; > chomp($passwd = ); Try

Re: [Perl-unix-users] Fetching web pages with an expired SSL Certificate

2008-01-14 Thread Bill Luebkert
eyal edri wrote: > Works! > > I've had another issue where a page didn't work if it signed its own > certificate (no CA), and i found somewhere that if you > set the following ENV it will work: > > ## CA CERT PEER VERIFICATION > $ENV{HTTPS_CA_FILE} = 'certs/ca-bundle.crt'; > $ENV{HTTPS_CA_DIR}

Re: [Perl-unix-users] Fetching web pages with an expired SSL Certificate

2008-01-13 Thread Bill Luebkert
eyal edri wrote: > Hi, > > i'm using LWP::UserAgent & Crypt:SSLeay to fetch pages from the web > (https also). > i was trying to fetch the url : https://www.magnusadventures.com/ > > and I've lwp returned the following error: > 500 SSL negotiation failed: err

Re: [Perl-unix-users] Want to Search missing heart beat of web server

2007-12-25 Thread Bill Luebkert
saeed ansari wrote: > Hi Carl, > > Thanks man, i tried but my code is giving some problem can any able to > give me sample code for this, I will be very thank full to him... thanks. 1) Your description of the problem failed to give enough info to come up with a solution. What are you looking f

Re: [Perl-unix-users] Sending "die" and "warn" messages to a file.

2007-08-30 Thread Bill Luebkert
Steve Remme wrote: > Is it possible to send the output from the 'die' and/or 'warn' commands > to a file instead of stderr? Ideally, I would like this behavior to be > configurable based on the existence of an environment variable. > > For example, if the environment variable MY_ERR_LOG is set

Re: [Perl-unix-users] installed package not found

2007-08-01 Thread Bill Luebkert
Greg Schraiber wrote: > Can anyone tell where/how perl constructs the @INC ? > > I have a script that works when executed via perl script.pl at the > command prompt, but does not run when executed via shell execute > statement from within a basic program. > > When executed from the basic progra

Re: [Perl-unix-users] allowing for a custom time window specification and then calculating if a date/time is within its range

2007-06-12 Thread Bill Luebkert
listmail wrote: > In the code below I started testing my options of allowing for a > maintenance window for specific days/hours to be specified and then > attempted to calculate if a specific day/time fell within that defined > window. I'm open to suggestions and would like to know if there is

Re: [Perl-unix-users] Socket connections

2007-06-06 Thread Bill Luebkert
Pierce, Glen wrote: > Hi All, > > I am hoping someone here can help me. First I will say I don’t have a > lot of experience setting up socket connections. I am trying to set up > a socket connection using IO::Socket. I want to establish a socket > connection and keep it established. Can t

Re: [Perl-unix-users] perl Hash help

2007-01-23 Thread Bill Luebkert
Mehta, Perdeep wrote: > Hi, > > I am looking for help to retrieve from a Hash of Hashes in insertion > order? I am not an expert in multi-dimensional Hashes, how could I use > Tie::IxHash module with a sub-Hash, if I could? > > Here is an example, I want to retrieve from sub-hash > %{$dir_cont

Re: [Perl-unix-users] Creating a Dynamic Table??

2007-01-10 Thread Bill Luebkert
Ben Eagle wrote: > I am making a PDF , which using PDF::Table I am making a table inside > that PDF. > > > What I am trying to do is make the table dynamic, cause I am passing > variables and I do not want a blank table row if the variable is empty. > This is what I have tried so far: > I am

Re: [Perl-unix-users] How to parse a date string and convert it into mm/dd/yyyy format

2007-01-05 Thread $Bill Luebkert
AITHA, BHEEMSEN (SBCSI) wrote: > Hi, > > I have a file with the following as the first line. > > 760434|c|061230 > > I need to parse this line and read 061230 into a variable and then try > to convert that string into the date in format mm/dd/. Report any > error while converting the string.

Re: [Perl-unix-users] parsing user command & parameter text: using split with space as the delimeter

2006-12-05 Thread $Bill Luebkert
listmail wrote: > $command =~ s/(".*) (.*")/$1:$2/g; Try something like: $command =~ s/("[^"]+) ([^"]+")/$1:$2/g; ___ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: [Perl-unix-users] Problems with parsing.

2006-11-30 Thread $Bill Luebkert
Claudia Agrelo wrote: > I am new with Perl, can someone help me? > I have the following LOG file, i want to extract the date (Thu Nov 30 > 14:12:07 CET 2006) > and the amount of httpd instances running (30). I am making the script > and i was able to > extract the number of instances but i really

Re: [Perl-unix-users] File::Find

2006-11-27 Thread $Bill Luebkert
Perl wrote: > Hello > >>I am using File::Find to find files located at a $dir directory, >>however it goes through all subdirectories. I mean I don't want >>to search recursively. >> >>Also which module you recommend for search and print through the >>files that File::Find will find. Just use o

Re: [Perl-unix-users] unpack template for AIX utmp struct

2006-09-07 Thread $Bill Luebkert
Pedro Simões wrote: > Hello, > I'm trying to figure out the unpack template for the AIX utmp struct. > > I've tried this templates: > A256 A14 A64 l s x2 l l s2 A256 l l2 l6 > A256 A14 A64 l s x2 l l s2 A256 l x8 x24 > A256 A14 A64 l s x2 l s2 A256 l l2 l6 > A256 A14 A64 l s x2 l s2 A256 l x8 x24

Re: [Perl-unix-users] [webservices SOAP]

2006-06-09 Thread $Bill Luebkert
Stéphane Galant wrote: > Hi all, > > > > I am currently using soap ::Lite 0.60 and mod_Perl 2 to realize a > webservice. > > I upgraded to soap::Lite 0.67 to avoid incompatibility problems with > Mod_Perl 2 > > > > Because of soap::Lite major changes (since 0.65) I cannot send an Http > a

[Perl-unix-users] Re: How to modify $ENV{PATH} portably?

2006-05-30 Thread $Bill Luebkert
Arijit Das wrote: > Hi, > > The format of env variable PATH seems to change with > OS/shell. For example, > in sh it is like > > "/dir1/bin:/dir2/bin:." > > while in csh, it is like > > (/dir1/bin /dir2/bin .) > > I need to search for "/dir2/bin" path component in my > $ENV{PATH}, and then

Re: [Perl-unix-users] winders diskdrive size

2006-05-10 Thread $Bill Luebkert
Mark Funk wrote: > Folks, > > > > I am forced to use perl v4 and am wondering what is the quickest/easiest > way to obtain the drive size on windows os Why are you asking in UNIX list ? Sample script sent direct. ___ Perl-Unix-Users mailing list Pe

Re: [Perl-unix-users] tee STDOUT to STDOUT and a Variable

2006-04-28 Thread $Bill Luebkert
listmail wrote: > I need to tee STDOUT to both STDOUT and a variable. For tee'ing to > STDOUT and a LOGFILE, I've used the older package described at > http://jenda.krynicky.cz/perl/TeeOutput.pm.html for some time and this > works wonderfully. I'm not getting a variable to work and > perhaps

Re: [Perl-unix-users] regular expression question

2006-04-26 Thread $Bill Luebkert
Cai, Lucy (L.) wrote: > Hi, all, > > I have a question about regular expression: > > my code is like this: > ** > sub IsPVob > { > my ($Vob) = @_; > > my $Output = `cleartool lsvob $Vob`; > die "IsPVob

Re: [Perl-unix-users] Counting words

2006-04-26 Thread $Bill Luebkert
Sharp, Craig wrote: > I have a file that contains many li˜es. Here is an example: > > evaluate eaprod 7844 2 15688 0 > 2 > evaluate agncyis 7347 2 14694 0 > 1 > agncyis compstr 1117

Re: [Perl-unix-users] Script to monitor cpu and process time and alert on threshhold

2006-04-24 Thread $Bill Luebkert
Sharp, Craig wrote: > Hi all, > > I need to create a script that will monitor the proc table and watch for > processes that exceed 5 minutes runtime and 90% cpu. The script then > needs to alter by email. The email part I can do, but the rest, I have > no idea where to start. You mean alert ra

Re: [Perl-unix-users] Need to have Message Queues accessible across NFS -- Suggestions

2006-03-29 Thread $Bill Luebkert
Arijit Das wrote: > I need a priority message queue which should be usable by different > unrelated processes and usable/acceisible from different machines (may > be using a filesystem path). > > So, its like I want the behaviour of an UNIX::IPC::MsgQueue but I need > visibility/accessibility li

Re: [Perl-unix-users] streaming data

2006-03-21 Thread $Bill Luebkert
Glennix glennix wrote: > hi. > > i made a small IM(primarily for Yahoo Messenger) proxy program that does > computername, IP address, time authentication, banned > words/phrases..etc. However there's a part of the data i can't read? how > do i read this? below is one line of the data. > > [EMA

[Perl-unix-users] Re: Timeing Out a Command - how to?

2006-03-13 Thread $Bill Luebkert
Arijit Das wrote: > Is there any way to time out a unix command? > > Its something like this... I want my PerlPgm to be > killed by the shell (sh/bash/csh) if my PerlPgm fails to finish off by > 300 elapsed seconds. > > Something like > > -timeout 300 might_hang.pl > > This should execut

Re: [Perl-unix-users] how to improve text manipulation

2006-03-10 Thread $Bill Luebkert
eyal edri wrote: > what i did and it's not good enough: > > 1. i've implemented this using ordinary "foreach $line (@lines)" file > processing, which is very slow when handeling large files. > and then it's quite easy. (using substr and such...). > > what i think needs to be done (and here i

Re: [Perl-unix-users] Regular Expression Question

2006-03-04 Thread $Bill Luebkert
Jason Vincent wrote: > > If I have a pattern that appears mulitple times (but I don't know how > many times) in a string, how do I get at the matched text for each of > the matches? > > Made up example… > > $string = 'ab23cdefgXX(3A5)XXhijkl23mnXX(3)XXopq432rsXX(450b)XXtuv'; > > If ($string =~

Re: [Perl-unix-users] validating (restricting) hash values and keys

2006-03-01 Thread $Bill Luebkert
listmail wrote: > #!/usr/bin/perl -w > use strict; > use warnings; > > my %hash = ( "acc12", 1, > "acc2", 0, > "acc3", '', > "una1", 1 ); > > $hash{acc3} = (); > > my $valid="acc1|acc2|acc3"; > > > > while (my ($key, $value) = each (%hash)) { >

Re: [Perl-unix-users] Using variables in a library path

2006-02-28 Thread $Bill Luebkert
Makarov, Vladimir/Medical Library wrote: > > Hello, > > I am trying to trivial things (I think): > Instead of using > > Use lib '\web_test\scripts\common\'; > Require 'header.pl'; Case is relevent in Perl and \s aren't portable, so use /s whenever possible. The \' is invalid syntax at the end

Re: [Perl-unix-users] Strange behaviour in Perl

2006-01-25 Thread $Bill Luebkert
Arijit Das wrote: > I am just wondering why is this giving a strange result. Any clues...? > > bash-2.01$ echo 4.56 | perl -p -e 'my $var1 = ; $var2 = $var1 * > 100; print $var2;' > 04.56 > bash-2.01$ > > I am expecting 456 in the ouput instead of 4.56 > > Am I missing anything...? Try it

Re: [Perl-unix-users] Email Address Validation

2006-01-16 Thread $Bill Luebkert
Bill Platt wrote: > I am trying to validate email addresses. > > I have the following code which succeeds in > most cases: > > if ($in{email} !~ /[EMAIL PROTECTED]/i) > > If the username part of the email address contains > either a "." or a "-", this code fails. > > Can you tell me why it wou

[Perl-unix-users] Re: Use of uninitialized value in string eq ERROR

2006-01-15 Thread $Bill Luebkert
eyal edri wrote: > Hello, > > I keep getting this error and it drive me nuts. ('Use of uninitialized > value in string eq' ) > i'll add a snippet from my code which produces this error: ... my $missingPatch = "no"; ... > if ( $missingPatch =~ m/yes/ ) --- > this is where the error occurs. > (

Re: [Perl-unix-users] running ssh commands remotely in Perl

2006-01-05 Thread $Bill Luebkert
Anthony Ettinger wrote: > Any thoughts? > > I'm looking for a "best practices". > > Basically, i'm on foo.org , and need to automate ssh > bar.org , and executea command or two, then copy the > file from that server, then delete it. > > I'd also like to not use 3

[Perl-unix-users] Re: Reopening STDOUT - howto?

2005-12-07 Thread $Bill Luebkert
Arijit Das wrote: > In Perl, after closing STDOUT, how can I reopen it? > > print "Writing to STDOUT before closing STDOUT..."; > close STDOUT; > > open STDOUT, ... > print "Writing back to STDOUT..."; You'll see how to save the previous FH and open a new one by reading the open function man

Re: [Perl-unix-users] How to execute a shell skript from perl in local context

2005-11-24 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote: > > system("script") is not my solution, because the script is executed in > a subshell, and his environment variables are lost after return to perl You might try using 'do' or turn it into a module and 'use' it. ___ Perl-Unix

Re: [Perl-unix-users] Help Needed With a Regex

2005-11-16 Thread $Bill Luebkert
Darryl Ross wrote: > Hey All, > > I have a string that looks like this: > > {key1,val1},{key2,val2},{key3,val3},{key4,val4},{key5,val5},... > > I'm trying to write a regular expression which can split up that string > and give me a hash back. There are a few gotchas though: > > - The key a

Re: [Perl-unix-users] handling data in tcp Sockets

2005-11-05 Thread $Bill Luebkert
Glennix glennix wrote: > hi. > > please pardon me for my probably ignorant question. > ^_^ > i'm writing a small IM(http for that matter) > proxy/filter and i'm having problems handling binary > data like images. they load very slowly if not at > all. i tried using binmode in my handle but sti

Re: [Perl-unix-users] More Cookie Issues

2005-11-04 Thread $Bill Luebkert
Bill Platt wrote: > I have set up the following code for the purpose of > putting a cookie on my site: > > $Cookie_html = "Set-Cookie: latc_affid='$cookie_data'; > expires='$CookieExpires'; path=$CookiePath; domain=$CookieDomain; > $CookieSecure\n"; What's in those vrbls ? > print "Content-type

Re: [Perl-unix-users] Cookies advice

2005-11-03 Thread $Bill Luebkert
Bill Platt wrote: > Now, I am beginning to think that I have > misunderstood the nature of using cookies. > I am actually attempting to do so for the > first time. > > When I fire the SetCookies procedure: > &setCookie("user", "dbewley", $expDate, $path, $domain); > > Is this the only way it can

Re: [Perl-unix-users] parsing ARGV

2005-11-03 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote: > Before I roll my own ARGV parse code I wanted to know if someone had > some sample code to get me started. I just want to be able to pass > simple switches that contain one parameter each to my perl app. I have > looked to the list first for I plan to accept the swi

Re: [Perl-unix-users] Changing $_ Output - Unknown Reason

2005-10-31 Thread $Bill Luebkert
Bill Platt wrote: > Hello, > > I have included a section of code below > that is driving me nuts. > > If I don't run the Substitution operations, > then I can successfully extract the URL > and the imbedded anchor text from > $parsed_html. > > Once I include the Substitution operations, > then

Re: [Perl-unix-users] how to speed up perl script load...

2005-10-27 Thread $Bill Luebkert
eyal edri wrote: > Bill Luebkert wrote: > > >How about telling us why you are using those routines ? > >Do you have a snippet of code that shows your usage of them ? > >I've never had the need for them, so I don't have any experience. >

Re: [Perl-unix-users] how to speed up perl script load...

2005-10-27 Thread $Bill Luebkert
eyal edri wrote: > Hi, > > Since I saw no one replied to my question yet, i will try to Clarify my > question due to some research I've done. > The Following 2 lines are the most significant in the overall > performance of the script: > 31.0 7.779 8.585 10715 0.0007 0.0008 > Text::Balanced

Re: [Perl-unix-users] Catching error from MIME::Lite

2005-10-26 Thread $Bill Luebkert
b try (&@) { my ($try, $catch) = @_; eval { &$try }; if ($@) { local $_ = $@; &$catch; } } sub catch (&) { $_[0] } try { $msg->send; } catch { print "Caught [EMAIL PROTECTED]"; }; -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED

Re: [Perl-unix-users] Using AutoSplit & Autoloader

2005-10-25 Thread $Bill Luebkert
eyal edri wrote: > Hi All, > > I've been trying to Optimize my perl program since it takes so much time > to load.. :( > I think the problem lays with the large number of modules being complied > at the start of the script. Have you profiles your code yet to see where the time is being sucked up

Re: [Perl-unix-users] how to speed up perl script load...

2005-10-23 Thread $Bill Luebkert
eyal edri wrote: > As you probably know the more modules use in your script the more time > it takes to load.. > > I've just finished a script (more like a program) which uses lot of perl > modules and has more than 2000 code lines. > Each time i run it, it takes more than 15 seconds to load.. :(

Re: [Perl-unix-users] How to set a local SHELL variable?

2005-10-23 Thread $Bill Luebkert
eyal edri wrote: > Hi, > > i want to set a local VAR on my tcsh. > such as : > > HTTP_proxy="http://myCompany.proxy.com:8080"; > > i've tried using: > > system("setenv HTTP_proxy "http://myCompany.proxy.com:8080";) > ; > `setenv HTTP_proxy "http://myCompany.p

Re: [Perl-unix-users] Sending array as a refference to a Sub

2005-10-23 Thread $Bill Luebkert
eyal edri wrote: > Hi, > > i want to know how can i send an array (@array) as reference to a sub > routine. > Just like in java or c# for eg: > > sub doSomething() > { > my $item; > push ($_[0], $item); > } > > #main > > doSomething (@array); > print @array; -- > i should now see it

Re: [Perl-unix-users] ignoring conditional use module statements

2005-10-20 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote: > Thanks for the varied suggestions. I'm still dealing with a few things > I cannot explain. I have provided below a very simple program that > produces errors in two scenarios, each case is resolved by reverting > back to the regular use statement. > > #EXAMPLE1: > #!

Re: [Perl-unix-users] ignoring conditional use module statements

2005-10-20 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote: > How can you get perl to not check for modules that are loaded > conditionaly? In the example below perl would still error on the Tk > module(s) if they are not installed. I'm basically coding to support > both a GUI and command line mode, eventually across a couple o

Re: [Perl-unix-users] Page Size -- How to get?

2005-09-23 Thread $Bill Luebkert
Arijit Das wrote: > As a non-superuser, any idea how can I get the page size of the > underlying unix operating system? It's going to vary by UNIX/LInux flavor, but you can try calling /usr/bin/pagesize if present. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAI

[Perl-unix-users] Re: Flushing all open file descriptors...

2005-08-26 Thread $Bill Luebkert
rite will also bypass any buffered IO since it uses the 'write' system call, but be careful mixing it with stdio (non-'sys') functions. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTEC

[Perl-unix-users] Re: Flushing all open file descriptors...

2005-08-25 Thread $Bill Luebkert
output as soon as possible. You could easily test it by opening your files and going to another terminal window and check the content of the files while your main code is in a long sleep loop. > > a_func_that_flushes_all_open_files(); > > kill -9, getpgrp(); -- ,-/- __

Re: [Perl-unix-users] embedding hash syntax

2005-05-12 Thread $Bill Luebkert
om my_table2}, list => q{select * from my_table2}, } } ); print $INST{$db_con}{version} . "\n"; print "TEST 1\n" . $QUERIES{APPUSER}{'9.2.0'}{count} . "\n"; print "Attempt to retreive version number from second reference that " . &q

Re: [Perl-unix-users] Problem

2005-05-01 Thread $Bill Luebkert
otal * 2 + $_ foreach split '', $_; print "The decimal equivalent of ", $_, " is ", $total, "\n"; } __END__ > perl wrong version: Don't use it. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// //

Re: [Perl-unix-users] Fwd: HList item values

2005-04-28 Thread $Bill Luebkert
h my $x ( 0 .. 3 ) { > $grid->itemCreate( $unique_rowname, $x, > -text => $customers[$row_number]->[$x] ); > > # You can change gridcontent later > $grid->itemConfigure( $unique_rowname, $x, -text => "don't >

Re: [Perl-unix-users] numeric comparisions containing trailing 0 in decimal place

2005-04-13 Thread $Bill Luebkert
uot;; > } > > sub equal { > my ($A, $B, $dp) = @_; > > return sprintf("%.${dp}g", $A) eq sprintf("%.${dp}g", $B); I would use %f instead of %g for your floating point format type. return sprintf("%.${dp}f", $A) eq sprintf("%.

Re: [Perl-unix-users] create variables from hash's keys & values

2005-04-05 Thread $Bill Luebkert
of complexity to your code. I'd still recommend using a short hash name instead and also be careful of what 'value' these vars/keys can take on from the config file. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE Col

Re: [Perl-unix-users] create variables from hash's keys & values

2005-04-05 Thread $Bill Luebkert
. Can this be done? Yes, but don't do it. If you absolutely must, check 'eval' out. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Med

Re: [Perl-unix-users] Accessing email from the web

2005-03-15 Thread $Bill Luebkert
Humberto Rodriguez wrote: > $Bill Luebkert wrote: > > >>You don't need quotes on the args above. > > I didn't think so, but like I said, I tried with single, with > double and without quotes. That just happens to be the way it > ended up. It sh

Re: [Perl-unix-users] Accessing mail from the web

2005-03-15 Thread $Bill Luebkert
Humberto Rodriguez wrote: > Dave Baker wrote: > >>Humberto, have you replaced the '/path/to/cgi- >>bin/webmail/modules' with >>the actual path name (in single quotes) to the modules? > > > Yes, i did. The snippet below shows the actual path. &

Re: [Perl-unix-users] Accessing mail from the web

2005-03-14 Thread $Bill Luebkert
ine, except that it does not handle MIME. Perhaps I can use > some combination of that module with the MIME modules. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o //

Re: [Perl-unix-users] execute the statement using the "exec ksh -c" in HP UNIX

2005-03-09 Thread $Bill Luebkert
> > The way I am calling is correct or not? > In unix shall I use ksh -c when script calling using perl. > Is there any alternative to ksh -c ? Try: /bin/sh -c You could also determine if ksh is a standard shell on your nix and if so, use the full path to it since

Re: [Perl-unix-users] How to get absolute path for a given file?

2005-02-24 Thread $Bill Luebkert
ipt irrespective of the > directory. Ex: ../../../testing/test_driver.pl # to find the path to the script you are executing: use FindBin qw($RealScript $RealDir); print "$RealDir/$RealScript\n"; -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED]

Re: [Perl-unix-users] looping over

2005-02-23 Thread $Bill Luebkert
that script automatically changes it to. > > for (my $i = 001; $i < 100; $i++) { >print $i; > } > > Is this a print formatting problem? Could some one help? foreach ('001' .. '100') { print $_, "\n"; } or print $_, "\n" foreach 

Re: [Perl-unix-users] subscriber

2005-02-22 Thread $Bill Luebkert
t work (some IO implementations are particularly cantankerous), then you may need something more like this: for (;;) { for ($curpos = tell(FILE); $_ = ; $curpos = tell(FILE)) { # search for som

Re: [Perl-unix-users] Search for a line and print the next 5 from a file

2005-01-31 Thread $Bill Luebkert
> } > } Example using this script file : # fubar open IN, $0 or die "Cannot open file: $!"; my @lines = ; for (my $ii = 0; $ii < @lines; $ii++) { if ($lines[$ii] =~ /^# fubar/){ print "Found: $_"; print @lines[$ii+1 .. $ii+5];

Re: [Perl-unix-users] IO::Socket & SMTP Connections

2004-12-28 Thread $Bill Luebkert
gt; print $rdata; > print $socket "Hello from ganymede. This is to test the spam > engine\n"; > $rdata = <$socket>; > print $rdata; > # this should be the "." on the single line, but what the heck? > print $

Re: [Perl-unix-users] Checking Socket Connections

2004-12-10 Thread $Bill Luebkert
y time. Is it possible to > check the health of the socket connection in Perl? Try setting the REUSE_ADDR flag : Set Reuse => 1 if using IO::Socket or $fh->setsockopt(SOL_SOCKET, SO_REUSEADDR, 1); or setsockopt (LISTEN, SOL_SOCKET, SO_REUSEADDR, 1); depending on how you open the

Re: [Perl-unix-users] remote login

2004-12-09 Thread $Bill Luebkert
use FTP to get the files and copy them to server which script > resides on? Maybe Net::SSH ? -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth &

Re: [Perl-unix-users] Method name is keyword

2004-11-30 Thread $Bill Luebkert
ete test case and indicate what error you are getting. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-'

Re: [Perl-unix-users] CGI Help Needed

2004-11-24 Thread $Bill Luebkert
at templating systems as one option. I only have a small pppicture of what you're trying to do and I can't really tell what would be an optimal solution. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE Collectibles

Re: [Perl-unix-users] CGI Help Needed

2004-11-24 Thread $Bill Luebkert
some guidelines. So what's the problem ? Just output the same HTML with the boxes checked. CGI.pm should make that easy for you if you aren't that adept at playing with CGI code. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE Co

[Perl-unix-users] Re: mkdir questions on unix platform

2004-11-15 Thread $Bill Luebkert
t at a time " mkdir '/var/tmp/sct_1.61' ... ; mkdir '/var/tmp/sct_1.61/data' ... ; or try using File::Path::mkpath to create the full path in one shot. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// //

Re: [Perl-unix-users] Discrepancy between File::Find behaviour on Solaris and Win32

2004-11-10 Thread $Bill Luebkert
iletest/020-d2/010-f1.txt > File: /filetest/020-d2/030-f3.txt > File: /filetest/test4.pl > > As you can see, the directories / files are not sorted according to the > numeric prefix. > I'm a newcomer to Perl, so any help would be greatly appreciated. -- ,-/-

Re: [Perl-unix-users] @ISA question

2004-11-09 Thread $Bill Luebkert
AIL PROTECTED]); # or groups of methods > > script called from pwd. > > DLOG.pm in pwd/LIB/ > > TYPEA.pm, etc in pwd/LIB/DATALOG_PARSERS/ > > > > /Is there an issue with having the package name not equal to the module > file name??/ The package name shou

[Perl-unix-users] Re: Simple perl ftp script -problem

2004-10-31 Thread $Bill Luebkert
ip = 'your ip here'; my $ftp = Net::FTP->new($host_ip, Debug => 1) or die "Unable to connect to $host_ip: $!\n"; print "Connected to host $host_ip\n"; __END__ Your errors at compile time mean either you have a syntax error or a bad Perl build. Run th

Re: [Perl-unix-users] How can I redirect STDERR to a file?

2004-10-29 Thread $Bill Luebkert
y correct result, it will go to the handle > --CHILD1, but if there is any error, it will output to the terminal, how > can I redirect th error to the handle -- CHILD1? Same thing - just add the redirection before the pipe. open (CHILD1, "$command 2>some_file |"); >

Re: [Perl-unix-users] How can I redirect STDERR to a file?

2004-10-29 Thread $Bill Luebkert
Cai, Lixin (L.) wrote: > I have a question, > > How can I redirect STDERR to a file, insead of output to the terminal? Depends on your shell syntax. perl fubar.pl 2>some_file should get it if you're not using {t}csh. -- ,-/- __ _ _ $Bill Luebkert

Re: [Perl-unix-users] How can I redirect STDERR to a file?

2004-10-29 Thread $Bill Luebkert
Cai, Lixin (L.) wrote: > I have a question, > > How can I redirect STDERR to a file, insead of output to the terminal? Depends on your shell syntax. perl fubar.pl 2>some_file should get it if you're not using {t}csh. -- ,-/- __ _ _ $Bill Luebkert

Re: [Perl-unix-users] deleting from array

2004-10-25 Thread $Bill Luebkert
Pasi Valkeila wrote: > Morjesta vaan! > > How can I delete a value from the middle of an array so that the array > shortens by one? > > Like this > > (1, 2, 3, 4, 5, 6, 7) > (1, 2, 3, 5, 6, 7) splice is your friend. -- ,-/- __ _ _ $Bil

Re: [Perl-unix-users] getprotobyname

2004-09-08 Thread $Bill Luebkert
= 3 Most NIX's give you a choice of files, NIS, NIS+, YP, DNS etc. and allow you to specify the order to search. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o //

Re: [Perl-unix-users] getprotobyname

2004-09-08 Thread $Bill Luebkert
#x27;))[2] . "\n" ); > > The above code when run gives the error: > > "Error Bad file number" -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o

Re: [Perl-unix-users] getprotobyname

2004-09-08 Thread $Bill Luebkert
reason a UNIX system would produce poorer results than Doze. You can verify it by checking /etc/protocol to see what 'udp' says. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] /

Re: [Perl-unix-users] convert £1,000,000 to £1m

2004-08-27 Thread $Bill Luebkert
# remove commas s/0{6,6}$/M/; # change to megas $_ = commify ($_); # fix commas print "$_\n"; # print result } sub commify ($) { # $ret = commify ($number) local $_ = shift; return $_ if tr/0-9/0-9/ < 4

Re: [Perl-unix-users] taking strings and printing them to a file which is itself a perl file

2004-08-27 Thread $Bill Luebkert
umper does everything I wanted. I've just never thought about using it to dump temporary data files and then parse them back in again. - currently there aren't any show stopping taint issues. You might also want to check out the Storable module. -- ,-/- __ _ _ $

Re: [Perl-unix-users] taking strings and printing them to a file which is itself a perl file

2004-08-26 Thread $Bill Luebkert
do that, will look it up. I fail to understand what you are getting at. Would you have an example to show that explains what you have so far managed not to have explained ? ;) -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE Co

Re: [Perl-unix-users] taking strings and printing them to a file which is itself a perl file

2004-08-26 Thread $Bill Luebkert
ld be using instead. Are you trying to replace the hash in the file or just write it to the file ? If you're trying to replace it, I would bracket the hash code in a pair of comment lines : ### REPLACE HASH START $hash= { 'key' => { 'original_value' => $

Re: [Perl-unix-users] Server-Clients model

2004-08-26 Thread $Bill Luebkert
lect (can_read, can_write and has_exceptions) and buffer the output on blocked output paths. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth

  1   2   3   >