RE: Overriding 'die' Functions

2004-03-22 Thread Bob Showalter
[EMAIL PROTECTED] wrote: ... Sometimes my script throw a die and I just know the line where was throw. What I want is to have the all stack, something like java. Look at the standard module 'Carp'. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

RE: Hash Assignment

2004-03-19 Thread Bob Showalter
stuart meacham wrote: If I have 2 arrays that I want to assign to the keys and values of a hash respectively, what would be easiest way to do that? @[EMAIL PROTECTED] = @valuesarray -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: how to make sure, that the script is running one time?

2004-03-12 Thread Bob Showalter
Christian Stalp wrote: Hello together, I have a question regarding process-control. I want to write a perl script which must not running in more than one process in the same time. The script creates a directory copys a zip-file in it, unpack it and reads every file in this package. However,

RE: Improving performance when working with large text files

2004-03-12 Thread Bob Showalter
Price, Jason wrote: I'm trying to optimize a script used for processing large text log files (around 45MB). I think I've got all the processing fairly well optimized, but I'm wondering if there's anything I can do to speed up the initial loading of the file. Currently, I'm performing

RE: how to get the buffer size of a string

2004-03-11 Thread Bob Showalter
[EMAIL PROTECTED] wrote: length() Returns the length in characters. How do I translate that to bytes? Read 'perldoc bytes' for an example of how to do this. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

RE: running CGI locally??

2004-03-05 Thread Bob Showalter
Freimuth,Robert wrote: Hello, ... I would like to build a simple browser-based UI ... That's good. You'll need a web server of some sort, since that's what browsers talk to. Since I'm trying to generate dynamic HTML pages, I thought CGI would be the way to go. However, from what I

RE: running CGI locally??

2004-03-05 Thread Bob Showalter
Freimuth,Robert wrote: ... I would like to build a simple browser-based UI ... That's good. You'll need a web server of some sort, since that's what browsers talk to. Since I'm trying to generate dynamic HTML pages, I thought CGI would be the way to go. However, from

RE: Code Socket Port... Read In and sent out to perl script

2004-03-05 Thread Bob Showalter
Paul Kraus wrote: I hate to ask for code but I am kind of in a crunch to finish a project. See below. I have the network programming with perl but it's just too much to read by tomorrow night :) Buy the Perl Cookbook. It has good examples for this kind of thing. I need a daemon

RE: Code Socket Port... Read In and sent out to perl script

2004-03-05 Thread Bob Showalter
Bob Showalter wrote: ... warn Received connection from $host, writing to $file\n; open F, $file; Stick some error checking in there :~) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org

RE: Array of objects

2004-03-04 Thread Bob Showalter
Jayakumar Rajagopal wrote: Hi , I have to store list of objects in Array. At the end, @arr contains n copies of last $obj, but not every $obj created. I tried storing both object, ref of object. Array contains different references, but same data. Please help. thanks, Jay the current

RE: links in POD

2004-03-03 Thread Bob Showalter
Freimuth,Robert wrote: Hi all, I'm trying to use POD to document my application. I have about 5 different doc files, and I'd like to create links between them when they are translated from POD to HTML. For example, in doc file 1 I'd like to say '...using the foo function, as described in

RE: Forking

2004-03-03 Thread Bob Showalter
Price, Jason wrote: Not sure if this is the right list for this - if it's not, please direct me to the proper list. You've come to the right place. Anyway, I'm trying to get my hands around forking, and was hoping you all could help me out. Basically, I'm trying to find a way to fire off

RE: Forking

2004-03-03 Thread Bob Showalter
Price, Jason wrote: Bob, Thanks for the input - it's quite helpful. However, I don't fully understand some of the code - maybe you could help clear it up for me. The parts I'm unclear on are: Wolf's aready explained most everything. I'll throw in a bit more... - the usage of pipe

RE: Forking

2004-03-03 Thread Bob Showalter
wolf blaum wrote: On Wednesday 03 March 2004 21:57, Bob Showalter generously enriched virtual reallity by making up this one: Hi, - 1 while wait() 0 That just reaps the exit statuses to prevent zombies; the children have already exited (otherwise the loop wouldn't have exited

RE: Execute an external script

2004-03-02 Thread Bob Showalter
[EMAIL PROTECTED] wrote: Hi! I've written a perl cgi script to create a web page. Now what I'd like to do is to execute an Octave script from the Perl one and get its output inside my perl script. I'm working on a Windows XP machine. I tried $result = `C:/Program\ Files/GNU\ Octave\ 2.1.50/bin

RE: ENV variables and custom 404 error page

2004-03-02 Thread Bob Showalter
Bryan Harris wrote: # do this. make sure that this line is the # ONLY thing you print out to the browser. print Location: http://rightplace.com/\n\n;; Wow, this is cool! Where is this documented? I'm interested in learning about other things like this... This is part of

RE: Newbie question

2004-03-01 Thread Bob Showalter
Shalabh wrote: hi all, Hi. Use a better subject line. i am searching from a tab delimited text file and it is returning the line with tabs which contains the search string into an array named @found_array, now i want to display it on an html page in a predefined format and for that i

RE: Assigning elements to array (U)

2004-03-01 Thread Bob Showalter
Meidling, Keith, CTR, ISD wrote: UNCLASSIFIED I tried that, and I get the following error... Possible attempt to separate words with commas at C:\test.plx line 6. 'Start test', 'Stop test' You should only get that warning if you used qw(), which Gary didn't. @arr = qw('foo bar',

RE: trouble with writing to file

2004-03-01 Thread Bob Showalter
Reinhard Mantey wrote: undef $/; my $input = ; my $pkg_filename = longnames.txt; open(FH, $pkg_filename) or die could not create $pkg_filename; while ($input =~ m/.../) { What is your actual regex? At a minimum, you'll need /g modifier. You may need /m and/or /s as well. print

RE: trouble with writing to file

2004-03-01 Thread Bob Showalter
incognito wrote: Thank you for your attention, Bob. What is your actual regex? At a minimum, you'll need /g modifier. You may need /m and/or /s as well. May be I didn't explained my prob exactly. I don't have a problem with the regex (and yes, I have the /m /g and /s). Related to the

RE: What are you really trying to do? - document type = applicat ion/vnd.ms-excel

2004-02-26 Thread Bob Showalter
Moon, John wrote: What I'm trying to do is make my new boss happy! They like everything in Excel. I have a BUNCH of CGI scripts on a SUN Unix generating tons of very nice HTML pages from data in an Oracle database I need to alternately be able to generate the same pages in an Excel

RE: newline or CR with join function

2004-02-26 Thread Bob Showalter
Gregg O'Donnell wrote: Greetings all, Instead of joining my scalars with ',' I'd like each to appear on a newline. Replacing ',' with '\n' doesn't work. Suggestions? Thanks! my $cfor_edu = join (',',$bs_alma,$bs,$ms_alma,$ms); You need to enclose \n in double quotes. Inside single quotes,

RE: Changing directory and running a program

2004-02-25 Thread Bob Showalter
Ned Cunningham wrote: HI all. Can anybody tell me how to execute a command remotely in a Perl script from a different directory. Please keep in mind I am asking what I want, not what you think I meant to say. I need to: ('cd /d e:\ned\nedsdir`); (`runprogram.exe -option - option

RE: Testing for STDIN

2004-02-25 Thread Bob Showalter
Timothy Donahue wrote: I have a program that I am writing that I need to accept input from either STDIN (for file redirections or pipes) or from the command-line. The program manipulates email addresses for our mail servers, so I should have the option to do either 'email_add [EMAIL

RE: CGI.pm unsecure / dangerous ?

2004-02-24 Thread Bob Showalter
David Gilden wrote: I just had blow up with a sys. adm. who said my script (see below) is potentialy unsecure and dangerous and therefor unacceptable. ... Is there away some could hijack my script, if so how, or is this sys. adm. not living in the real world? You are passing form parameters

RE: Digest::MD5

2004-02-20 Thread Bob Showalter
Dave Tibbals wrote: I am attempting to install the module Digest::MD5 and it fails with the makefile for the module. The error reported is *** missing separator. Stop. Something's wrong with the Makefile. This can happen if tabs get expanded to spaces or if DOS-style line endings are used.

RE: Digest::MD5

2004-02-20 Thread Bob Showalter
[redirectinb back to list] Dave Tibbals wrote: Dave Tibbals wrote: I am attempting to install the module Digest::MD5 and it fails with the makefile for the module. The error reported is *** missing separator. Stop. Something's wrong with the Makefile. This can happen if tabs get expanded

RE: Digest::MD5

2004-02-20 Thread Bob Showalter
Dave Tibbals wrote: What line is make complaining about the missing separator? What does the Makefile look like around that line? From CPAN shell, you can do the following to run the steps separately: look Digest::MD5 $ perl Makefile.PL $ make This is what I get:

RE: Could I put commands in a variable

2004-02-19 Thread Bob Showalter
Joel wrote: Yes, BASIC is the only programming I have ever done. All I can really remember was PRINT, GOTO, and a variety of line numbers. I'm trying to write a text adventure (Don't look at me like that, Perl is a general purpose language!). I'm getting tired of writing large chunks of code

RE: [OT] Apache internal server redirects

2004-02-17 Thread Bob Showalter
[EMAIL PROTECTED] wrote: I have an internal server that I need to pass external visitors to from a web page. The internal server isn't set up to go through the firewall so I am looking for a way to make web server (which does play nice) to access the other server via http and let a user

RE: Why does this keep happening?

2004-02-17 Thread Bob Showalter
Joel wrote: I'm running perl under windows XP and I keep geting this error: syntax error at (Directory and filename) Line 6, near ) { syntax error at (directory and filename) line 9 near } The source code is below, but this happens with loops in general. Any ideas?

RE: How to call perl with in-line contents?

2004-02-13 Thread Bob Showalter
Vishal Vasan wrote: Hi All, I have a file with the following contents (temp.txt). A1110 G1115 B1110 C D E1113 F1115 and so on. I have to read the contents from this file and create 2 seperate files. The 1st file contains the lines ending with 0 and 1 while the 2nd file

RE: Email text encoding

2004-02-11 Thread Bob Showalter
Camilo Gonzalez wrote: Eek! I've been told by my ISP that my Perl script to email myself and the user of my form the contents on my contact form has been hijacked by a spammer. My ISP has been deluged by recipients with complaints. Where have I gone wrong? Please be kind, this is a beginners'

RE: Uploading large files thru HTTP

2004-02-09 Thread Bob Showalter
Nilay Puri, Noida wrote: Hi all, I am uplaoding files from one server to another server using Perl HTTP post. But when the file size increases to 2 MB , i get error. Is there any way I can specify the max file size ? You can only do this if you control the server. Do you? -- To

RE: Uploading large files thru HTTP

2004-02-09 Thread Bob Showalter
Bob Showalter wrote: Nilay Puri, Noida wrote: Hi all, I am uplaoding files from one server to another server using Perl HTTP post. But when the file size increases to 2 MB , i get error. Is there any way I can specify the max file size ? You can only do this if you control

RE: get_uid sub critic

2004-02-09 Thread Bob Showalter
Kenton Brede wrote: I've written the following subroutine to snag the next available UID in the 700 range from /etc/passwd. I then use the return value with useradd to add a new user. Note that this algorithm contains a race condition. Between the scan of /etc/passwd and the call to useradd,

RE: Sending mails

2004-02-04 Thread Bob Showalter
Nilanjana Bhattacharya wrote: Hello everybody, I have two radio buttons in a form. I want - When any one clicks on button A a mail will be sent to A when any one clicks on button B mail will be sent to button B. In both the cases whether someone clicks on A or B I will receive a mail. Can

RE: Array subtraction, like sets

2004-01-30 Thread Bob Showalter
Robin Sheat wrote: Hey there, what is a nice way of doing what this looks like it should do: @a=([1,2,3],[5,5,5],[9,8,7]); @b=([5,5,5],[1,2,3]); @[EMAIL PROTECTED]@b; and have @c == ([1,2,3]); Is there a good way of doing this? (I've tried the obvious things on the command line, to

RE: error but code works

2004-01-29 Thread Bob Showalter
Gary Stainburn wrote: Hi folks, I've got the following code which works, but generates the error message following it. I've tried varying the code to eliminate the error but I only manage to get either the working code with error or non-working code without error. (Line 95 is the while

Re: binary perl

2004-01-24 Thread Bob Showalter
Dan Brow wrote: Is it possible to make a perl script/program a binary file? For bundling, yes. For hiding source, not really. I have a few scripts some one wants but I don't want them to have the source. I tried perlcc but I want it to remain perl not c, if that's possible or realistic.

RE: Convert Date to week number

2004-01-23 Thread Bob Showalter
Tim wrote: At 03:16 PM 1/23/04 +, you wrote: ... Why not write it yourself? You need to know: - Which day of the week is the 'first'. - Which was the first week of the year that had four or more days. That's week one. Then do the sums/arithmetic/math/mathematics/calculations

RE: can i do it with perl ?

2004-01-23 Thread Bob Showalter
Joe Echavarria wrote: I there, I need to write a web database application using perl, and i need a way that when the users logs into the system i download all the information regarding to the user to its local computer and make all the transaction locally. After that, when the

RE: LWP get with no cache

2004-01-22 Thread Bob Showalter
J. Alejandro Ceballos Z. wrote: I created a cron job that gets a page using LWP::Simple, but everytime it runs via cron, it sends me the results generated when I called directly; like if the page was called from memory or from a cache, not from the actual one. Is there any way

RE: search an replace

2004-01-22 Thread Bob Showalter
Steve Grazzini wrote: rmck wrote: But I run this system call and it took allnight to run :( You were asking perl to rewrite the whole file for every line you wanted to change. #!/usr/bin/perl use strict; use warnings;# or just use Foo::Monkey :-) use POSIX

RE: format localtime()

2004-01-21 Thread Bob Showalter
rmck wrote: I cant get localtime to print in mm-dd- hh:mm:ss , I keep getting it like so Sun Dec 28 03:35:19 2003 POSIX::strftime gives you complete control over the format. use POSIX 'strftime'; print strftime('%m-%d-%Y %H:%M:%S', localtime), \n; perldoc POSIX -- To unsubscribe,

RE: String manipulation

2004-01-19 Thread Bob Showalter
Jerry Preston wrote: Hi! I am trying to figure out a simple, Perl way to break down any sting similar to the following: $s0 = 01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25, 26,27,28,29; Or in any numeric order. The string cannot be longer than 55

RE: One line variable declaration with multiple conditions

2004-01-07 Thread Bob Showalter
Dan Muey wrote: Howdy list. I'm trying to one lineify this: my $guts = $firstchoice || ''; if(!$guts $use_second_choice_if_first_is_empty) { $guts = $secondchoice; } Basically my $guts = $firstchoice || $secondchoic || ''; Would be perfect except I only want to let it use

RE: Splitting Comma delimited list

2003-12-29 Thread Bob Showalter
Colin Johnstone wrote: Hi All, I have nothing to gain by not showing you all my code, I have included all suggested changes and even am writing to the select list the number of elements. note the second item. here is my code again with the changes and the output below, note the items

Re: Splitting Comma delimited list

2003-12-29 Thread Bob Showalter
Colin Johnstone wrote: Bob, The cms makes those changes. It also inserts comments as shown below which aren't in my code and wraps it all in the select tags. A suggestion: Post a message with the input data, the script, and the actual output produced *by that script*. Put the input data

RE: Running command from string variable as if part of script

2003-12-22 Thread Bob Showalter
Tushar Gokhale wrote: I'm reading another perl script into array and want to commands from the the array as if normal perl commands. How do I do it? If you want to execute the perl commands in the other script, don't read them into an array; just do() the script: do './myscript.pl';

RE: How to catch kill signal in PERL

2003-12-22 Thread Bob Showalter
Titu Kim wrote: Hi, I am writing a simple perl script that will catch kill signal. I am able to catch the signal sent within the script. However, if I kill the process in a shell using kill -9 PID, the handler does not catch it. Can someone help me? Here is my code snippet.

RE: foreach

2003-12-19 Thread Bob Showalter
Jeff Westman wrote: Eric Walker [EMAIL PROTECTED] wrote: I got it so I need a counter which sends me to a for loop instead of a foreach. Thanks.. perlknucklehead I believe that 'for' and 'foreach' are completely interchangable. I remember reading somewhere that one was a synonym

RE: Preventing Accidentally Fork Bombing My Box

2003-12-19 Thread Bob Showalter
Dan Anderson wrote: I'm creating an app that uses forks in a number of places to do things quicker. Unfortunately, I have a bad habit of accidentally fork bombing my box. Is there any way I can run a perl process (even if it's a Linux command) so that it wont eat up all available resources

RE: diff between packages and modules

2003-12-19 Thread Bob Showalter
christopher j bottaro wrote: i'm reading Programming Perl and i'm on the chapter about packages. it says that packages and modules are very similar and that novices can think of packages, modules, and classes as the same thing, but i wanna know exactly what the differences between packages and

RE: Please wait while I get your data ...

2003-12-18 Thread Bob Showalter
Mallik wrote: Hi Bill, We are also looking for the same solution My problem is, I have to fetch data from tbe database and display it on browser. The datbase is very huge. It is taking more time to query the data. Mean while timeout error is occuring on the browser. So, we are also

RE: Ending a compound statement

2003-12-18 Thread Bob Showalter
Kenton Brede wrote: Does a compound statement need to end with an else ? No. I know - if (expression) { statement; } elsif (expression) { statement; } works but I've never seen a block like that in a book yet. I usually see something like - if (expression) {

RE: Problems with Inheritance in GD::Graph

2003-12-17 Thread Bob Showalter
Dan Anderson wrote: I am trying out GD::Graph, which is a CPAN module that creates a method new, and then for each graph type inherits that new method (I think -- I had to open the code). So I tried calling: my $graph = GD::Graph::bars-new(400, 600); And I get the error: Can't

RE: how to print modification date

2003-12-16 Thread Bob Showalter
Stephan Hochhaus wrote: Hello list, I tried to dig my way through my newly acquired Perl ina nutshell and Learning Perl, but I couldn't find a satisfying solution to my problem: How can I print the last modification date of a file? It should work on different systems (*nix and OS X,

RE: Get Terminal Width and Height, Pure Perl

2003-12-15 Thread Bob Showalter
James Edward Gray II wrote: On Dec 15, 2003, at 10:51 AM, Charles K. Clarkson wrote: James Edward Gray II [EMAIL PROTECTED] wrote: So my question is, is there a Pure Perl way to fetch the terminal columns and rows? I took a look at the source of Term::ReadKey and it

RE: Use DBI quote without creating an object

2003-12-11 Thread Bob Showalter
Dan Muey wrote: Howdy! I'm creating some sql entries into a text file. I'd like to use DBI's quote function without having to connect to a database and without having to create my own! Is that possible? I've tried importing quote, doing DBI::quote, DBI::db::quote, and various

RE: Get file size without downloading

2003-12-10 Thread Bob Showalter
usef wrote: Hi, Is there any way to get the size of a file without downloading it? I want to write a program using LWP to download a file only if it is bigger than 3K but smaller than 500K. So I need to know the file size in the first place. You issue a HEAD request to the server and look

RE: passing an array

2003-12-10 Thread Bob Showalter
Mike Blezien wrote: Hello, what is the best way to pass an array to a sub routine, IE. You can't pass an array to a sub. You can only pass a list of scalars. my @fields = qw(one two three); send_array(@fields); sub send_array { my @ary = @_; Whatever you passed ends up in @_.

RE: Get file size without downloading

2003-12-10 Thread Bob Showalter
usef wrote: Hi, FTP or HTTP? HTTP, but I want to know the method for FTP as well. Thanks -u I think that will work for FTP as well. Give it a try. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

RE: Match the first 3 characters of 2 words?

2003-12-10 Thread Bob Showalter
Rod wrote: What is the easiest way to test the first 3 characters of two words for a match. IE: dasf test dasg to return positive. substr($word1, 0, 3) eq substr($word2, 0, 3) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: How do I set up bidirectional pipes over a network connection ?

2003-12-09 Thread Bob Showalter
Dan Anderson wrote: On Tue, 2003-12-09 at 16:31, James Edward Gray II wrote: On Dec 9, 2003, at 3:19 PM, Dan Anderson wrote: I have 2 Linux boxes I want to talk to each other over the local network using a Perl script. Is it possible to set up a bidirectional pipe so that 2 perl

RE: [OT] Education Level

2003-12-08 Thread Bob Showalter
radhika sambamurti wrote: I chose the liberal arts route, and ended up with a degree in economics and history. I took a similar route. B.A., History and M.B.A., Finance. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

RE: Frustrated newbie question

2003-12-05 Thread Bob Showalter
[EMAIL PROTECTED] wrote: Help. I'm a frustrated newbie who wants to use Perl to make my life easier. The following simple task is only one small part of a program I'm trying to put together to automate some things I currently do manually. I have a file whose format looks like this:

RE: remove control chars

2003-12-04 Thread Bob Showalter
Kipp, James wrote: Doesn't quite work. Notice I need to keep any newline ( \n ) chars. Sorry, I missed that in the original post. Jeff gave you the fix. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: hostname

2003-12-04 Thread Bob Showalter
Thomas Browner wrote: Is there away to find all of the hostname on a lan with use of perl? Getting a list of host names involves querying some kind of nameserver or directory service. What kind of LAN? What kind of hosts? You can query DNS to get the hosts in a domain using nslookup, dig, host,

RE: Beta Testing a Robot

2003-12-04 Thread Bob Showalter
Casey West wrote: I'm beta-testing a robot that searches Google when new questions are posed to the beginners' lists. I have no idea if it will be useful. I'm not thrilled with the bot traffic, but at least it can be easily filtered out now. Perhaps the bot should only address questions that

RE: Finding Hosts On Lan - Re: hostname

2003-12-04 Thread Bob Showalter
drieux wrote: On Dec 4, 2003, at 8:18 AM, Bob Showalter wrote: Thomas Browner wrote: Is there away to find all of the hostname on a lan with use of perl? [..] You can query DNS to get the hosts in a domain using nslookup, dig, host, or similar. For example: host -l mydomain.com

RE: Reading files

2003-12-03 Thread Bob Showalter
[EMAIL PROTECTED] wrote: Hello All, I am trying to open a file once , and then duplicate it's File Handle. I am trying to workout example straight from FAQ5, with no luck. What does no luck mean? You never tell us what happens when you run your code. I will basicly trying to open a file,

RE: first steps - read from files and make linklist

2003-12-03 Thread Bob Showalter
Stephan Hochhaus wrote: Hello list, I am trying to write my very own first useful program and I am in need of some help. I do have a lot of ressources (a book by Andrew Johnson, the yellow book for dummies and lots of hypertexts) but I cannot seem to get things done the way they're supposed

RE: remove control chars

2003-12-03 Thread Bob Showalter
Kipp, James wrote: Hi I have some C code that I need to convert to perl and I am pressed for time, which is why I am posting this. All the code does is read each character from either STDIN or a file and replaces any ASCII control characters with a space. Is the perl getc() function the

RE: first steps - read from files and make linklist

2003-12-03 Thread Bob Showalter
Stephan Hochhaus wrote: The while(FILE) reads a line into the $_ variable, but you're not printing that; you're printing the filename itself. So you'll get one line of (the same) output for each line in the file. Ah, I should have seen that in the first place Then to show just the

RE: New Folder Creation

2003-12-02 Thread Bob Showalter
Browning, James wrote: Can someone point me in the right direction to find a simple script that will automate the creation of folders as needed? See also the standard File::Path module. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Can' t read all bytes from Socket

2003-12-01 Thread Bob Showalter
Kipp, James wrote: Hi I have simple client/server socket scripts that that send some data from the server to the client. It works fine, except the client can't seem to read more than 2920 bytes from the server using sysread(). So the data I am sending over gets cut off. Here is the relevant

RE: Storing Form Data without submitting it.

2003-11-26 Thread Bob Showalter
Andrew Gaffney wrote: I believe there is an HTTP status code that tells the browser that the form was successfully submitted, but not to go anywhere. I don't know what it is off the top of my head, but I think it would work in this case. Would that be 204 No Content?

RE: factorial function

2003-11-26 Thread Bob Showalter
B. Rothstein wrote: Does anyone have any suggestions on how to create an array to hold the value of 1000 factorial? This will compute it: perl -MMath::BigInt -le '$n = Math::BigInt-new(1); $n *= $_ for 2..1000; print $n' You can stick the result in an array if you want... -- To unsubscribe,

RE: factorial function

2003-11-26 Thread Bob Showalter
[EMAIL PROTECTED] wrote: B. Rothstein wrote: Does anyone have any suggestions on how to create an array to hold the value of 1000 factorial? This will compute it: perl -MMath::BigInt -le '$n = Math::BigInt-new(1); $n *= $_ for 2..1000; print $n' in trying to understand

RE: Testing Perl on a Web Page

2003-11-26 Thread Bob Showalter
Jeff Westman wrote: Hello There, I would like to see if my ISP has perl available if one wanted to incorporate perl into a web page. Is there a quick and dirty web page I can upload to my ISP to test if perl is available and works ? I would also like to see what version of perl is running

RE: Reply to the list WAS Yahoo! Getter

2003-11-26 Thread Bob Showalter
Jerry Rocteur wrote: ... I see this a lot of this on this list, Reply to the list, Reply to the list, Reply to the list. If it was the intention of the list manager for people to reply to the list then a reply would go to the list, however, a reply goes to the poster, not the list.

RE: Using print to overwrite a line

2003-11-25 Thread Bob Showalter
Paul Harwood wrote: Is there a simple way to print over an existing line? For example: I would like to have a progress report that reads 10%, 20% etc. I don't want to print a new line each time. I want to write over the existing line and have it update as it goes. --Paul Use \r to move

Re: piping problem

2003-11-22 Thread Bob Showalter
Ilkka Naulapää wrote: hi all, I'm quite new with perl and so far i've managed to get all done i've needed to. But now I have a problem i need some help with. I need to pipe *huge* output from one program into my perl script and i want to start processing it right away without waiting this

RE: Ticked Off..

2003-11-21 Thread Bob Showalter
Eric Walker wrote: Hey all I know I have been told but I can't seem to access this hash. Can anyone look and see why I can't print out any values. The print item statement works and prints out the first level of the hash. I send in a pointer to $data and $rule. sub COMMENTSYNC{

RE: How does perl compile functions

2003-11-20 Thread Bob Showalter
Dan Anderson wrote: I'm curious how perl compiles functions internally. When the actual C code (or ASM equivalent or bytecode or whatever Perl uses) for a function is run, is there overhead to the function? Are functions inlined? perldoc perlguts exaplains a lot of that stuff. Does

RE: Portable unix du command

2003-11-18 Thread Bob Showalter
Dan Muey wrote: Howdy group. I have a need to get the size of a directory. I could just execute unix's du command (my $sz = `du -sh /usr`;) but was wondering if there's a better way to do it that is more portable. I looked on cpan but didn't see anythign that jumped out at me. There's a

RE: Counting (easy!) - select???

2003-11-13 Thread Bob Showalter
Christiane Nerz wrote: Kevin Old wrote: ... select undef, undef, undef, 0.25 or print $_ for 1 .. 5; ... quite interesting chunk of code - but what the hell does select does here? Yeah - I rtfm - but didn't understand it - maybe one could explain it in more simple words? It's used in

RE: Perl Equavlent

2003-11-13 Thread Bob Showalter
Mike Blezien wrote: Hi, Ran accross a function called ceil and from the information I got on this: ceil() [Stands for ceiling], it just rounds a float value up.. so ceil(4.7) == ceil(4.1342) == 5 would this be the same as using int function in perl No. int() simply drops the

RE: REMOTE_USER

2003-11-12 Thread Bob Showalter
Colin Johnstone wrote: Gidday All, We are running AIX on an IBM HTTP server with IHS. We are serving static HTML pages. Some of these pages are to be protected. OK. That's the job of the web server, so you need to configure it to protect those pages. With Apache, you use .htaccess files

RE: how do I create a image

2003-11-12 Thread Bob Showalter
Ramprasad A Padmanabhan wrote: On Tue, 2003-11-11 at 19:59, James Edward Gray II wrote: On Nov 11, 2003, at 8:23 AM, Ramprasad A Padmanabhan wrote: Thanks for the info Is there an utility which can do this I am not bothered if it is a very heavy code , I am not going to

RE: Matching/replacing

2003-11-12 Thread Bob Showalter
LoneWolf wrote: I have to parse a big file and I do it line by line to keep stuff going correctly. I am at a point where I need it to go through and replace every with inches and ' with feet, IF item in front of it is a digit (0-9). You can use: s/(\d)/$1 inches/g or s/(?=\d)/

RE: question on perlmodule main

2003-11-11 Thread Bob Showalter
Hari Krishnaan wrote: Hi, what does the following code line mean ? $test = main:: . $main::$foo; It has a syntax error, so won't compile. Perhaps you mean: $test = main:: . $main::foo; If that's what you meant, it contatenates the string literal main:: with the contents of the $foo

RE: reference to a subroutine in @INC

2003-11-11 Thread Bob Showalter
Raj (Basavaraj) Karadakal wrote: Hi, I am trying to package a perl script and the modules it uses , in a tar file. When untarred on any machine, the modules can be found in a known relative path with respect to the script. The path in which these modules are available can change

RE: reference to a subroutine in @INC

2003-11-11 Thread Bob Showalter
Bob Showalter wrote: You can't use a reference to a subroutine in @INC Oops. Apparently in 5.8, you *can* do this. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: use of File::Find

2003-11-06 Thread Bob Showalter
West, William M wrote: find (\transfer, $path); sub transfer { my ($newpath, $oldstring, $newstring) = @_; otherstuff ($oldstring, $newstring); # etc... } now- how do i pass parameters to transfer() when it's called with find?? i want the recursive

RE: Why can't I create a binary file ?

2003-11-06 Thread Bob Showalter
Bee wrote: open FH, 1.txt; binmode FH; binmode STDOUT; print FH 123m,zxnc,mzxnc,mzncm,zxc; close FH; Why the output still a text file ? A file's a file. Terms like text and binary are just conventions. To the OS, a file's just a collection of bytes. What were you expecting to be in the

RE: Regex search using scalar

2003-11-05 Thread Bob Showalter
Paul Harwood wrote: I would like to enumerate a list and search through each element like so: If (/$logs[i]/) { # code} I know the syntax is wrong so I was hoping someone could explain how to do this. If I understand correctly, you want to use grep(): for (grep

RE: Regex search using scalar

2003-11-05 Thread Bob Showalter
Paul Harwood wrote: Thanks. Can I substitute /pattern/ with a scalar though? Yes. grep $_ eq 'string', @list -Original Message- From: Bob Showalter [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 05, 2003 5:24 AM To: Paul Harwood; Beginner Perl Subject: RE: Regex

RE: Why is parsing your own form data a bad idea?

2003-11-05 Thread Bob Showalter
Dan Anderson wrote: There doesn't seem to be what I want in CGI.pm. (I want to create a %GET and %POST hash of the form $HASH{NAME} = VALUE). Look at perldoc CGI under FETCHING THE PARAMETER LIST AS A HASH -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

<    1   2   3   4   5   6   7   8   9   10   >