with the
index $array[$#array+1]. So don't do that. :-)
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
| Q. How do you tell an extrovert techie from an introvert techie?
| A. He looks at your feet rather than his own.
--
To unsubscribe, e-mail: [EMAIL PROTECTED
double-quotes in the useradd command look redundant. Try
removing them, if it still doesn't work. They may been being processed
as part of the username/password.
Hope this helps,
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
--
To unsubscribe, e-mail: [EMAIL
wouldn't see initialization warnings in that scope.
Hope this helps. perldoc perllexwarn for some more..
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
' for information about the $| variable.
This doesn't help with storing the output from ls to a file rather than
STDOUT, which should be done with something like:
open(FILE, result) or die $!;
print FILE `ls`;
close FILE;
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger
://www.bestpractical.com/rt/ .
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
| Banks use perl? Let me take my $money out.
| Only banks for rich people. Banks for people like you use COBOL.
| -- gale:[EMAIL PROTECTED], 2002-08-26.
--
To unsubscribe, e-mail: [EMAIL
://archive.develooper.com/macosx%40perl.org/msg02650.html
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
search
functions. I prefer the interface at http://search-beta.cpan.org/ .
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
Blessings to the chap who invented ice cream, ginger-pop and the rest!
I'd rather invent things like that any day than rockets and bombs
, though:
Changes to $_ inside an FD are _not_ reflected back to a file.
You can read 'perldoc -q How do I change one line in a file' for
the suggested ways of doing modifications like this.
Hope this helps,
- Chris.
--
Chris Ball | [EMAIL PROTECTED] | +44 207 677 2305
--
To unsubscribe, e
it in
script with the use lib ; pragma or changing the bang-line to include
-Idir. Outside of your script, you can manipulate the PERLLIB or
PERL5LIB environment variables.
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
Blessings to the chap who invented ice cream
Helpful::Script'' - it's
trivial to get a CPAN account, and new uploads aren't vetted.
In theory, though, it's likely that such a module would be noticed very
quickly indeed, and removed of anything harmful. Hopefully.
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger
.
Japhy has a page explaining crypt(), which should clear everything up
for you. It's on-line at: http://www.crusoe.net/~jeffp/docs/crypt
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
chris@lexis:~$ perl -le'@a=($^O eq 'darwin')?qw(100453 81289 9159):qw
,
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
chris@lexis:~$ perl -le'@a=($^O eq 'darwin')?qw(100453 81289 9159):qw
(23152 19246 2040);while(){chomp;push @b,$_ if grep {$.==$_}@a}push
@b,$^X;print ucfirst join( ,@b[2,0,3,1]).,'/usr/share/dict/words
, and not to Perl itself at all.
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
chris@lexis:~$ perl -le'@a=($^O eq 'darwin')?qw(100453 81289 9159):qw
(23152 19246 2040);while(){chomp;push @b,$_ if grep {$.==$_}@a}push
@b,$^X;print ucfirst join( ,@b[2,0,3,1]).,'/usr/share
. :-)
The post I'm thinking of is at:
http://archive.develooper.com/beginners%40perl.org/msg16089.html
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
that we're talking about
something that could be any variable. You can read about them at:
http://www.tuxedo.org/jargon/html/entry/metasyntactic-variable.html
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
--
To unsubscribe, e-mail: [EMAIL PROTECTED
Any ideas how I could code this, or is there a better way
Postman of actually getting random stuff.
Someone beat you to it. :) The Crypt::Random CPAN module is an
interface to /dev/random (and /dev/urandom).
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris
with: perldoc perltoc
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
the replies.
I've submitted a documentation patch on this and it's been applied to
the 5.8 tree. There'll be mention of perltoc as a good place to start
on the `perldoc perldoc` page in that release.
Hope this helps,
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris
.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
jn == josenyimi [EMAIL PROTECTED] writes:
jn The task is simply to upercase the first char of a given string
jn and lowercase the rest.
$string = ucfirst lc $string;
Nice try, though. :-)
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris
--
void:chris~
Hope this helps,
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
Never go in against a Sicilian when _death_ is on the line! - Vizzini
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
some ideas,
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
Never go in against a Sicilian when _death_ is on the line! - Vizzini
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
and perl and Python and Perl
look OK, while awk and Perl and Python and perl do
not. But never write PERL, because perl isn't really an
acronym, apocryphal folklore and post-facto expansions
notwithstanding.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger
that $argument{1,2} don't contain special chars
$argument1 =~ s/[^A-Za-z0-9:\.]//;
$argument2 =~ s/[^A-Za-z0-9:\.]//;
do_something_with($argument1, $argument2);
Hope this helps,
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
As to luck, there's
.
Hope this helps,
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
As to luck, there's the old miners' proverb: Gold is where you find it.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
, in Text/:
lexis:chris...perl5/5.7.2/Text % ls
Abbrev.pm Balanced.podSoundex.pm Wrap.pm
Balanced.pm ParseWords.pm Tabs.pm
Hope this helps.
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
As to luck, there's the old miners' proverb: Gold
,
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
As to luck, there's the old miners' proverb: Gold is where you find it.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Me == Chris Ball [EMAIL PROTECTED] writes:
Me I was wondering whether it would be worthwhile creating a CPAN
Me module - something like WWW::Google::SOAP - to allow simple
Me searches with the SOAP API, returning a nice hash. Looks like
Me it might be..
... and it also looks
to a file.
But this really is very off-topic. :-)
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
As to luck, there's the old miners' proverb: Gold is where you find it.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
; # an ascending numerical sort.
instead of:
@results = sort @array; # which is equal to sort {$a cmp $b} @array.
The difference is '=' (numerical comparison) against 'cmp' (lexical
comparison).
Hope this helps. perldoc -f sort for more information.
- Chris.
--
$a=printf.net; Chris Ball | chris
; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
As to luck, there's the old miners' proverb: Gold is where you find it.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
but is there any other way
Nikola around it?
Not as far as I know. 'script.pl file1\* \*file2\*' will pass them
untouched, if you have access to what's happening at the shell level.
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
In the beginning
.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
1 is equal to 2 for sufficiently large values of 1.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
all data from H1/TITLE /HEADBODY
Daniel BGCOLOR=FFh1I want all if this data extracted from
Daniel heading 1 (h1)/h1 /BODY/HTML
while ($stream-get_tag(h1)) { $data = get_trimmed_text(/h1); }
(Also see perldoc HTML::TokeParser, once it's installed.)
- Chris.
--
$a=printf.net; Chris Ball
effectively impossible to parse HTML accurately with regexps.
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
In the beginning there was nothing, which exploded.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
the size of $filename in bytes.
More information at perldoc -f stat,
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
In the beginning there was nothing, which exploded.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail
that can be entirely
executed from the command line and returns a useful return code - I
don't have familiarity with VB, but my short experiences seem to suggest
that this would be rare.
*awaits correction from Japhy* :-)
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris
://archive.develooper.com/beginners%40perl.org/
Hope this helps,
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
In the beginning there was nothing, which exploded.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
(three digits), and note the == to make a
comparison rather than an assignment.
Hope this helps,
- Chris.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
In the beginning there was nothing, which exploded.
--
To unsubscribe, e-mail: [EMAIL PROTECTED
.
I'm also still an HTML::TokeParser geek. TokeParser allows you to grab
the contents of HTML tags, even if there's a complex structure to the
page defining which tags you want to take and which you don't.
Hope either of these spark someone's interest.
- Chris.
--
$a=printf.net; Chris Ball
, but as a special subroutine name; described in
perldoc -f import. 'import Some::Module' is not valid perl code.
Hope this helps,
- ~C.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
As to luck, there's the old miners' proverb: Gold is where you find it.
--
To unsubscribe, e
; # Remove (p|P) for each array element.
Hope this helps. Merry Christmas, list!
- ~C.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
As to luck, there's the old miners' proverb: Gold is where you find it.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
of interest, what sort of UNIX command _needs_ a
list like that instead of an explicit one?
- ~C.
void:chris~ % cat compact.pl
#!/usr/bin/perl -w
# Author: Chris Ball [EMAIL PROTECTED]
# Function: Provide a 'compact list' for an array of numbers.
# Also at: http://printf.net/compact.pl
my
_me_ a regexp
master yesterday. Sigh.
I wrote:
I'll bow down to anyone who can make a one-liner of it, naturally.
It reduced a sizeable algorithm down to one simple regex:
s/\b(\d+)(?:,((??{1+$+})\n))+/$1-$+/g;
fx: Chris bows deeply and respectfully
- ~C.
--
$a=printf.net; Chris Ball
On Mon, 2001-12-17 at 15:46, Jeff 'japhy' Pinyan wrote:
It certainly puts my C-like code to shame. It's very nice.
And even more so to my code. Very well written, Bob.
- ~C.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
In the beginning there was nothing
and sample
usage for each function.
The [EMAIL PROTECTED] mailing list would be a good place
to follow-up to if you still have questions.
- ~C.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
As to luck, there's the old miners' proverb: Gold is where you find
at all.
Oops.
- ~C.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
As to luck, there's the old miners' proverb: Gold is where you find it.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Fri, 2001-12-07 at 17:19, Juan Manuel Espinoza wrote:
How can i open a URL in PERL?
With the 'LWP' modules. In this case, putting the HTML to Google's
front page in $content:
use LWP::Simple;
my $content = get( http://www.google.com/; ) or die $!;
Hope this helps,
- ~C.
--
Chris Ball
| perl -nle 'print substr($_, -3, 3)'
[ -3 makes us start here ^, 3 makes us travel for three characters. ]
Left can be done with substring (x,0) I am sure
Yes, indeed: echo abcdefgh | perl -nle 'print substr($_, 0, 3)'
Hope this helps,
- ~C.
--
$a=printf.net; Chris Ball | chris@void.$a | www
reject based on this hash. It's probably
overkill for me, but it sounds like you get enough spam to use it -
assuming you have control of the machine your mail comes to. (which I'll
assume, based on your mail address of webmaster@)
Just an idea,
- ~C.
--
$a=printf.net; Chris Ball | chris@void
.
--
Chris Ball E-mail: [EMAIL PROTECTED]
Web Programmer Web : www.fastsearch.com
Fast Web Media Ltd Mobile: +44 (0)7769 903 770
12th Floor Sunlight House, Quay Street, Manchester M3 3JZ, UK.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands
example.
[2]: Simon Cozens' NetThink comes to mind - http://www.netthink.co.uk/
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
In the beginning there was nothing, which exploded.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e
to know that the environmental
variables that your hash represents are already available from within
perl, in the %ENV hash. For example, 'print SHELL = $ENV{'SHELL'};
will also work as expected.
Hope this helps,
~C.
--
$a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris
language.
/me :-)
~C.
--
Chris Ball.
[EMAIL PROTECTED] || http://printf.net/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
54 matches
Mail list logo