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
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
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
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/
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&
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"
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/
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
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/
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/
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
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/
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,
# 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/
").
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/
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::
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
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/
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/
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
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
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/
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/
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
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
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/
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
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/
"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/
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/
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/
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
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/
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
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
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
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/
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/
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/
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/
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
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/
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
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/
;
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
( `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/
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
-
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
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/
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/
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/
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/
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
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/
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
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!
-
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
\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
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
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/
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
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
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
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/
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/
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/
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
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/
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/
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
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/
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/
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/
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
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/
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/
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/
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
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/
> > 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
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/
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
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
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/
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/
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
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
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.
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/
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/
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/
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/
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
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/
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/
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,
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/
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
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/
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 - 100 of 931 matches
Mail list logo