Re: algorithm permute

2008-11-17 Thread Tom Phoenix
ted output to a file from 2 terminals. There > are lot of differences. PERL5LIB, perhaps? You can use that environment variable to try out a module without installing it "for real". Another one to check is PATH; you could be using a different perl binary without realizing it. Hope th

Re: Having trouble with cpan

2008-07-22 Thread Tom Phoenix
shell like us old timers used to do. Somebody around here probably still remembers how to run a Makefile.PL from the command line Or you can type "perldoc perlmodinstall" at the command line and read about it. Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscrib

Re: In List1 but not in List2

2008-03-26 Thread Tom Phoenix
On Wed, Mar 26, 2008 at 11:08 AM, <[EMAIL PROTECTED]> wrote: > How do I mod the code to function as is with two args (perlscr > list1.txt list2.txt) > or accept stdin as data_file when only one arg is given? (cat > list1.txt | perlscr list2.txt) First off, I must not fail to induct you into

Re: In List1 but not in List2

2008-03-26 Thread Tom Phoenix
print $item; print while ; last DATA_LINE; } } # the inner loop has now updated $current_filter print $item unless $item eq $current_filter; } Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Sum not producing zero

2008-03-12 Thread Tom Phoenix
Good thing you didn't say anything important. Except > Subject: Re: Sum not producing zero Oh, right. Hey, if using this subroutine is the "solution", does that mean that you're adding up your financial numbers with accumulating round-off error and then using this code&

Re: how do I shorten this code

2008-03-11 Thread Tom Phoenix
compilation errors.\n}; You can optimize your code for many things; for speed, for code size, for understandability. But making it work right in the first place is more important than any of those other things. ObPerl: my %tenjqk = map +($_,1), qw{10 J Q K}; print "gotcha\n"

Re: posix shared memory

2008-03-10 Thread Tom Phoenix
s of Perl. If that's not in Sys::Mmap, it might be in PerlIO, or elsewhere. http://search.cpan.org/~rgarcia/perl-5.10.0/lib/PerlIO.pm Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: CGI problem fith file URIs

2008-03-10 Thread Tom Phoenix
On Mon, Mar 10, 2008 at 12:17 PM, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: > In what way is opening a file from a browser a CGI problem? Maybe you missed where the OP said "I am developing a help viewer app with CGI pm." Cheers! --Tom Phoenix Stonehenge Perl Training

Re: CGI problem fith file URIs

2008-03-10 Thread Tom Phoenix
ith Perl, you should be asking your questions about that in the beginners-CGI forum. http://learn.perl.org/faq/beginners-cgi.html Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Filehandles in a socket server

2008-03-10 Thread Tom Phoenix
onvenient ways to work with most data. Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: how and where to install module

2008-03-09 Thread Tom Phoenix
vides that functionality. Most importantly, if you're doing CGI programming with Perl, you should be asking your questions about that in the beginners-CGI forum. http://learn.perl.org/faq/beginners-cgi.html Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mai

Re: substr help

2008-03-06 Thread Tom Phoenix
ep through a program and see what's really happening to its data. Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Check if a given function returns something

2008-03-01 Thread Tom Phoenix
to you via the mailing list, even if the message bodies are identical. Of course, you could also figure it out by noticing which message arrives first; the mailing list will almost certainly add a noticeable amount of delay. Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe,

Re: Check if a given function returns something

2008-02-29 Thread Tom Phoenix
# gets empty list What do you do with return that "gives you a zero"? --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Check if a given function returns something

2008-02-29 Thread Tom Phoenix
"). What does "the return value is limited" mean? Can you give a concrete example of what you're talking about? --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: How to read from keyboard?

2008-02-27 Thread Tom Phoenix
ng below an example program that uses Term::ReadKey. The program isn't quite correct, but I hope trying your keystrokes while it's running will help you to get to the next step. Good luck with it! --Tom Phoenix Stonehenge Perl Training #!/usr/bin/perl use strict; use warnings; use Term::

Re: about install module GD::Text

2008-02-24 Thread Tom Phoenix
ead-multi/auto/GD/GD.so: > undefined symbol: gdImageGifAnimAddPtr at > /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230. It looks like your GD module itself is broken. You should go back and re-install it, being certain that the new build passes all tests. Good luck with it! --Tom Phoenix Stonehenge Perl Training

Re: lwp & post

2008-02-22 Thread Tom Phoenix
amples.pod Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Excel Type Sorting ???

2008-02-16 Thread Tom Phoenix
C} cmp $b->{C} } Of course, that's probably not the way your criteria are stored, but it should give you the general idea. http://perldoc.perl.org/functions/sort.html Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: SOAP::Lite on Leopard

2008-02-08 Thread Tom Phoenix
n installing modules under Leopard? Installing modules on Mac OS X? Installing modules in general? http://search.cpan.org/~mkutter/SOAP-Lite/ http://perldoc.perl.org/perlmodinstall.html Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] Fo

Re: system ("find...") - escape character help

2008-02-08 Thread Tom Phoenix
for you? You should be able to use it in conjunction with the File::Find solution that you already have. chmod is documented in the perlfunc manpage. http://perldoc.perl.org/functions/chmod.html Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] F

Re: Calling Tomahawk tool in perl script

2008-02-06 Thread Tom Phoenix
er program from Perl? If not, perhaps you should explain in more detail what you want to do. Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: parsing html question

2008-02-05 Thread Tom Phoenix
ition.) I'm sure that anyone who frequently uses Perl's patterns, or any other regular expressions, will find this book informative today. http://regex.info/ Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: PerlMagick, refer to single image in image array

2008-02-04 Thread Tom Phoenix
t went wrong? Thanks. There's a better than 90% chance that you forgot to put 'use strict' and 'use warnings' lines above your code. use strict; use warnings; If you get an error message that you're not sure about, see what the perldiag manpage says about it. H

Re: debugger questions

2008-02-01 Thread Tom Phoenix
ses the debugger to pipe the output to a pager program for easy reading; the backslash preserves the structure of the hash: |x \%DB::optionVars If you're trying to access a lexical variable, though, you'll need to stop the debugger somewhere within the scope of that lexical in order t

Re: Hiding standard output

2008-02-01 Thread Tom Phoenix
operator, documented in the perlop manpage. http://perldoc.perl.org/perlop.html#Quote-Like-Operators Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: IO::Compress::Gzip creates empty file

2008-01-31 Thread Tom Phoenix
don't even have to use the debugger to do this, but it makes it easier. Without a debugger, just copy the files so that you can look at the copies later.) If the result is not right, make a stand-alone program that replicates the original conditions, and you'll get the same result; fi

Re: How can I open a file with "/"?

2008-01-31 Thread Tom Phoenix
please tell us: What are you _really_ trying to accomplish by putting characters like '/' and '&' in a filename? Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: IO::Compress::Gzip creates empty file

2008-01-31 Thread Tom Phoenix
"the same file as we just tested", but without going back to the OS to ask again. http://perldoc.perl.org/functions/-X.html Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: IO::Compress::Gzip creates empty file

2008-01-31 Thread Tom Phoenix
unless -f $new_name and -s _; > I've extracted and wrapped this code to create a little test program > which works fine, that is, the resulting compressed file contains the > data I expect. That would imply that the bug is in the other part of your code. Are you using both 'strict' and 'warnings'? Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: How to read an rfc spec

2008-01-28 Thread Tom Phoenix
s are posted to the correct forum. Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: About File::Monitor

2008-01-25 Thread Tom Phoenix
maybe a little program logic can make errors reasonably infrequent, and if the circumstances make errors reasonably easy to recover from, it's not a bad solution. Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-m

Re: 答复: is there a way to read content from lnk on windows?

2008-01-25 Thread Tom Phoenix
ot;, and pulling data from the .lnk file format probably deserves a module of its own. Neither type of module seems to be available on CPAN yet. Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Can't Install Perl as Non-Root

2008-01-24 Thread Tom Phoenix
On Jan 24, 2008 3:33 PM, Liam <[EMAIL PROTECTED]> wrote: > Tom Phoenix wrote: > > It looks as if you need to fix the system damage, so that your OS is > > reasonably similar to the configuration that other people have used to > > build perl. Experts on your OS may be

Re: About File::Monitor

2008-01-24 Thread Tom Phoenix
le was altered "during the sleep"? For example, it could be that you tried to change a file, but your change was still in an output buffer, and not yet flushed to disk, when the second scan occurred. Did the module pass all tests before you installed it? Hope this helps! --Tom Phoenix

Re: Return number of keys in a hash of hash? Looping through "sub hash"?

2008-01-24 Thread Tom Phoenix
sh_reference }; You can replace $sub_hash_reference with any expression that returns the reference to your sub-hash, such as $myHash{fred}, say. > Alternately, how could I loop through keys in a hash of a hash? foreach my $key (keys %{ $sub_hash_reference }) { ... } Hope this helps! --Tom

Re: [Q from Progamming perl] s/^-(?=.)//

2008-01-24 Thread Tom Phoenix
ext, and redo operators would be unable to operate upon the named blocks from within a nested block. Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

How to leave this list

2008-01-24 Thread Tom Phoenix
ing those pieces together, after you fix them up for the real address. Be sure to include all the punctuation in the right places. Good luck with the puzzle! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Can't Install Perl as Non-Root

2008-01-24 Thread Tom Phoenix
o build perl. Experts on your OS may be able to help, or you may be able to re-install the OS itself. Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: passing array reference from one perl script to another perl scirpt

2008-01-24 Thread Tom Phoenix
gram to another. You are mistaken. See the perlipc manpage for good information on inter-process communication methods that actually work. Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: NIS map lookup

2008-01-23 Thread Tom Phoenix
On Jan 23, 2008 1:17 PM, Vahid Moghaddasi <[EMAIL PROTECTED]> wrote: > On Jan 23, 2008 2:56 PM, Tom Phoenix <[EMAIL PROTECTED]> wrote: > > > > it is hard coded to use cc compiler instead of gcc. > > > > Where did you get that idea? > > > > The

Re: NIS map lookup

2008-01-23 Thread Tom Phoenix
s error when use the module: > Can't locate auto/Net/NIS/TIEHASH.al in @INC How did you try to build, test, and install the module? --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: perl intersect problem

2008-01-23 Thread Tom Phoenix
arlier: I'd start by looking in the archives of discussion areas for system administrators. Surely somebody else has had to unify machines like this. > my $result = grep( /$system/, $geco); Do you want something like this? my $result = ( index($geco, $system) != -1 ); Cheers! --Tom Phoen

Re: creating multiple variables in loop

2008-01-23 Thread Tom Phoenix
it's meant to be used. Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Postponing variable replacement

2008-01-23 Thread Tom Phoenix
; use warnings; my $message = '$who is cool'; my %includes; # . $includes{'who'} = 'perl'; (my $new_message = $message) =~ s/\$(\w+)/$includes{$1}/g; print "$new_message\n"; Hope this helps! --Tom Phoenix Stonehenge Perl Tra

Re: speeding up a perl script

2008-01-23 Thread Tom Phoenix
( `ls -1c /home/etc/*log | tail -1 `); > #determine the latest and last document That shell command could be more efficiently done within perl with readdir and friends. Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: losing variable in CGI.pm redirect

2008-01-23 Thread Tom Phoenix
does your program differ from this one? #!/usr/bin/perl use strict; use warnings; use CGI; my $value = 'redirect_ID'; my $query = new CGI; print $query->redirect("mytest.pl?ID=$value"); Hope this helps! --Tom Phoenix Stonehenge Perl Training -

Re: perl intersect problem

2008-01-22 Thread Tom Phoenix
D was itself dropped. Is that what you want it to do? Maybe you can invent a better solution. For example, instead of dropping users whose UID has been used elsewhere, perhaps they could be assigned new UIDs; I imagine that would make the users happier. Duplicate usernames aren't so simple

Re: perl intersect problem

2008-01-22 Thread Tom Phoenix
you're having. >From the look of your code, the output should be missing some whose UID or username are duplicates; are those the ones you can't find? Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Hash of hashes?

2008-01-21 Thread Tom Phoenix
erence a reference in the perlreftut manpage. http://perldoc.perl.org/perlreftut.html Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Getting last key from a file

2008-01-19 Thread Tom Phoenix
but it sounds like what you're looking for. seek() is documented in the perlfunc manpage. Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Can't Install Perl as Non-Root

2008-01-19 Thread Tom Phoenix
x27; step separately from 'make test'. Unfortunately, seeing the aftermath of a big wreck, it's sometimes hard to see what caused it. Did you run up against your disk space quota, perhaps? Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Help in system function

2008-01-18 Thread Tom Phoenix
iled.\n" } If the program you're running itself doesn't notice that things have failed, of course, it won't be able to tell your program. In that case, you'll want to fix the external program, or find another way to identify problems. Good luck with it! --Tom Phoenix S

Re: Can't understand this code snippet

2008-01-18 Thread Tom Phoenix
ts_of_randomness/4)) { $token .= unpack "H4", pack "S", int rand 2**16; } Of course, that may require changes to subsequent parts of the code that expected $token to be an integer instead of a string, for example. Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: find2perl

2008-01-17 Thread Tom Phoenix
ut so much has already been said, both here and on PerlMonks. So I'm appending a program to this message that shows an unusual way of setting the prune variable. You can, I hope, improve upon this algorithm once you understand it. Good luck with it! --Tom Phoenix Stonehenge Perl Training

Re: Memory Usage of my Script

2008-01-17 Thread Tom Phoenix
ld be more efficient in the long run to spend your time working at the car wash and earning enough in tips to buy that extra memory, which you can then use to play NetHack with the rest of us. Now you see why Perl programmers don't spend much time worrying about memory management. Cheers! -

Re: ASP with VIEWSTATE and perl

2008-01-17 Thread Tom Phoenix
On Jan 17, 2008 4:32 AM, Michael Alipio <[EMAIL PROTECTED]> wrote: > Anyone here knows a module which can handle viewstate > in asp html forms?? Have you looked on CPAN yet? http://search.cpan.org Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMA

Re: Problems in creating executable

2008-01-16 Thread Tom Phoenix
\Perl\lib\CORE\perl.h(420) : fatal error C1083: Cannot open include > file: 'sys > /types.h': No such file or directory Did the error message really include a line break within the file name? That's suspicious. Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubsc

Re: compile perl

2008-01-16 Thread Tom Phoenix
ase, your original trouble was that SIGTERM wasn't being recognized as a signal. How were you using it? If you're still having trouble with SIGTERM, check out the diagnostic program I've appended to this message. Do your various perl binaries say anything interesting when you

Re: Ideas for matching several lines of code (C)

2008-01-16 Thread Tom Phoenix
short yet complete example program that other people could run to see what you're trying? Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Problem Directing BCP error to error file

2008-01-16 Thread Tom Phoenix
ooks like: > > bcp ..test_b_plan_cp in /home/file_out.txt -c -t '|' -S *-U > ** -P **-I /home/bcp2db_sql.ini -e /home/bcp2db.error. Is this question about Perl? I think you sent it to the wrong list. There may be a forum elsewhere about this bcp program, or rela

Re: compile perl

2008-01-16 Thread Tom Phoenix
On Jan 16, 2008 4:47 AM, Diego . <[EMAIL PROTECTED]> wrote: > i'm trying to compile perl 5.8.8 Does it pass all tests, when you run 'make test'? Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

Re: Monitor a directory for file creation

2008-01-15 Thread Tom Phoenix
es it works to wait for a predetermined amount of time after some event, then to assume (i.e. hope) that the file is finished. It all depends upon what works best for your situation. Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additi

Re: How to get error?

2008-01-15 Thread Tom Phoenix
be secure to do that operation. See the full story about taint checking in the perlsec manpage. Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: space in variable referencing

2008-01-12 Thread Tom Phoenix
ignore some whitespace within a variable in ordinary code, quoted whitespace is significant. Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: user arguments, oracle - insert, delete and drop!

2008-01-11 Thread Tom Phoenix
and spell as carefully as you can." What is your level of knowledge, that we can best help you? You can best show us your knowledge of Perl by showing us your code. Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: insert and query a db

2008-01-11 Thread Tom Phoenix
be helpful to step through your code in the Perl debugger. You can stop at any statement to see what values your variables really have. That's documented in the perldebug manpage. http://perldoc.perl.org/perldebug.html Good luck with it! --Tom Phoenix Stonehenge Perl Training

Re: user arguments, oracle - insert, delete and drop!

2008-01-11 Thread Tom Phoenix
Perl code could easily detect and avoid. What have you tried? Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: using wrapsuid

2008-01-10 Thread Tom Phoenix
lar wrapper from the perlsec manpage. As for security issues, the whole trick is to know what your code is actually doing. Using the wrapper suggested in the perlsec manpage compares quite favorably to other solutions in terms of the amount of source code that you need to examine. Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Error while using BCP in from Inside Perl Script

2008-01-10 Thread Tom Phoenix
hoping that one will eventually do the job. When you see what you're asking the shell to do, if you still can't see the trouble, ask about it in a forum about shell commands and their syntax. Since your task was accomplished, it may be that both the system and exec calls in your program

Re: How to test if a graph is a subgraph of another graph?

2008-01-10 Thread Tom Phoenix
ur own. http://search.cpan.org/ Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: find2perl

2008-01-09 Thread Tom Phoenix
is my command!" It will consider that directory to be complete, and go on to the next, thereby pruning the search tree. Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: More installing modules issues - using a local directory

2008-01-09 Thread Tom Phoenix
lib' line added near the top. Using the correct path should allow the installation program to find the right module. Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: avoid using a temporary variable

2008-01-08 Thread Tom Phoenix
On Jan 8, 2008 7:38 AM, Robert Citek <[EMAIL PROTECTED]> wrote: > What I really want to know is if there's a way to eliminate the > temporary variable. Are temporary variables quite expensive in your country? Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscrib

Re: reading and writing file names

2008-01-07 Thread Tom Phoenix
platforms if possible. Are you looking for Storable? Try the command 'perldoc Storable' to learn more. Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: What is happening with this filehandle?

2008-01-07 Thread Tom Phoenix
is case? It's a pipe-open: http://perldoc.perl.org/perlopentut.html#Pipe-Opens Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Calling perl module located in some other folder.

2008-01-04 Thread Tom Phoenix
essage, that message should tell you where perl is looking (and not finding) your module; you can use that feedback to adjust the 'use lib' line accordingly. Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: file::find

2008-01-04 Thread Tom Phoenix
you're doing. Did you mean to use the scalar m//g? > elsif ( $fs !~ m|\/\w+| ) { This elsif always fires, doesn't it? I can't see how you're thinking that this pattern could match if the first didn't find a forward slash. Is there something else going on here? Ho

How to leave the list

2008-01-03 Thread Tom Phoenix
ail address you get by putting those pieces together, after you fix them up for the real address. Good luck with the puzzle! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: How to extract the HTML tag?

2008-01-03 Thread Tom Phoenix
> > information you want. See my other email for the names of some > > modules that you might find handy. > > Even that , I would like to know how to make this work... You should study the source code of one of those modules and see how they do it. Cheers! --Tom Phoenix Stone

Re: values of DBI statement handle not getting written into text file

2008-01-02 Thread Tom Phoenix
ection. But that's neither this problem nor this forum. http://xkcd.com/327/ > my $results=$DB_CLASS_OBJ->RETRIVE_DATA($SQL); > > (open my $FH, '>>', "$FILE") or die "$!"; How many filehandles are open to the same file, anyway? Is that a red flag or a red herring? Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Perl Script for Network bandwidth consumption by a particular Application

2008-01-02 Thread Tom Phoenix
may be able to track bandwidth usage by application. You'll need to ask the OS for the data. Check the documentation for your OS to see whether it provides an interface to request the data, or whether you can add one. Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubsc

Re: Use parentheses in translation strings

2008-01-02 Thread Tom Phoenix
I expected the code would be like: > > $org_str =~ tr//\(\d\d\d\d\)/; The tr/// operator doesn't work like that. It's primarily for changing single characters for other characters, not substrings for substrings. You may be thinking of s///, but I'm not sure what you&#

Re: absolute beginner: perlrefs to "stack" values

2008-01-01 Thread Tom Phoenix
as needed (and I shouldn't tell you this, but it doesn't really keep them on the stack), so your program won't segfault like a C program might. Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Looping through lines stored in a scalar

2008-01-01 Thread Tom Phoenix
ere are probably other useful techniques, depending upon what else you're doing with the data. Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: using scalar as an operator

2007-12-31 Thread Tom Phoenix
tring that has Words in it'; > > if($string =~ /$regex/$modifier){ > print "match\n"; > } This is why '(?i)' was invented. You want something like this: my $word = 'word'; my $modifier = '(?i)'; my $string = 'a string that h

Re: configuring startperl during make ?

2007-12-30 Thread Tom Phoenix
e; if you have to write code just to get a module installed, that's quite UNusual. Is your site that much different than every other place where these modules get installed? I have the feeling that you haven't said yet what makes your situation unusual, and that may make all the differenc

Re: Handling errors when working with files

2007-12-30 Thread Tom Phoenix
cases, it's easiest to just use Perl's normal control structures: foreach my $file (@lots_of_file_names) { if (unlink $file) { print "You'll never see '$file' again!\n"; } else { print "Couldn't unlink '$file': $!; continuing.

Re: Problem with adding a connection with Win32::NetResource

2007-12-29 Thread Tom Phoenix
t; to X:? > > Of course not :) I'm new to Perl, not computers. :) Have you actually tried any other available letter than X? Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Handling errors when working with files

2007-12-29 Thread Tom Phoenix
ly, and safely directly from within Perl. See the unlink and rmdir functions in perlfunc. Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: thumbs nails of file

2007-12-29 Thread Tom Phoenix
hat file format you're dealing with; there's probably a module on CPAN for it. Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: configuring startperl during make ?

2007-12-28 Thread Tom Phoenix
to hack up a utility to munge the shebang lines. How hard could it be? Somebody is probably making a one-liner to do that right now Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: replace chars

2007-12-26 Thread Tom Phoenix
On Dec 26, 2007 9:33 AM, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: > Tom Phoenix wrote: > > You might be able to do what you want with Encode. > > > > http://perldoc.perl.org/Encode.html > > Might he? How? If what he wants is within the abilities of that

Re: replace chars

2007-12-26 Thread Tom Phoenix
dule that can do this? You might be able to do what you want with Encode. http://perldoc.perl.org/Encode.html Hope this helps! --Tom Phoenix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: how to run a script at remote location (windows-->linux)

2007-12-26 Thread Tom Phoenix
from scratch. Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: process snapshot

2007-12-24 Thread Tom Phoenix
n a way analogous to what Apache does, then how to get what you want should be documented somewhere; find that (or make it happen, if you've got the program's source) and you'll be most of the way there. Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe,

Re: Ragged Hierarchy

2007-12-21 Thread Tom Phoenix
ECTED],-2,-3,-4,-5,-6,-7]; Maybe you want reverse()? Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: duration of iterations of a for-loop

2007-12-21 Thread Tom Phoenix
uld be with the help of a module like this one: http://search.cpan.org/~kitdekat/Perf-Stopwatch-0.10.2/ This assumes that your system supports the underlying Time::HiRes module. If it doesn't, what I think you're asking for may not be possible on your system. Good luck with it! --Tom

Re: Ragged Hierarchy

2007-12-20 Thread Tom Phoenix
the problem of identifying the last element's index is easy; it's the last valid index of the array. my @v = split /,/, $_; my $last_elem_index = $#v; Does that get you closer to a solution? Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: variable module

2007-12-20 Thread Tom Phoenix
ource for AnyDBM_File for an example of a module that loads one module of many possibilities. The command below should show you the source on your system: perldoc -m AnyDBM_File Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional co

  1   2   3   4   5   6   7   8   9   10   >