Eric,
Use Data::Dumper, it'll do this very well if it's just for debugging purposes.
Check out the documentation on cpan.org:
http://search.cpan.org/author/JHI/perl-5.8.0/ext/Data/Dumper/Dumper.pm
or `man Data::Dumper` if you're on a UNIX machine.
--
> There's also modules if it's a complicated list of command options.
>
> Not sure of the name exactly, just go to search.cpan.org and
> take a look.
That'd be Getopt::Long and Getopt::Std -- should be part of the default perl package.
--
Jim,
You could start by defining what a word is, using some regex:
$wordRegex = qr/... something here .../;
Then build up from there:
($match) = $input =~ /($wordRegex{10}\s$word\s$wordRegex{10})/;
Just an idea.
--
David Olbersen
iGuard Engineer
11415 West Bernardo
There's a quoting issue in your rsh line, unless it's been created by your email
program.
------
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152
> -Original Message-
> From: Distribution List
David,
Take a look at perlmonks.org, somebody wrote a script that does something very similar
to what you're looking for.
Specifically, http://www.perlmonks.com/index.pl?node_id=12287 has a good starting
point!
It uses the MIME tools if memory serves me...
--
Eric,
On a UNIX system you could try something very slow like:
find /usr /home -type f -name "*.pm" -ls
You'd need to do that as root to make sure you could search all the sub-directories.
With respect to available functions, read the man pages!
--
All'adr,
Something like (untested) this?
while( <> ) {
print $_ unless( $. == 132 or $. == 133 or $. == 134 );
}
--
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152
> -Original Messa
For the second script, read up on the CGI module. It should do a lot of what you want.
You'll also need to read up on the `` (backtick) operator.
------
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152
> -Origi
=~ $search_string) {
print "yes\n";
exit();
}
}
print "no\n";
The problem that you're having is that "$_ =~ $search_string" is missing something:
what that =~ operator should do!
Try changing that to "$_ =~ m/$search_string/&
0 and
> -20.00 (s denotes a whitespace charcater).
Gufran,
In that case you were close. This will work:
$length = scalar( split( //, $number[$i] ) );
Since split() returns an array, and any array passed to scalar() returns it's length,
this should be what you want.
---
Gufranul,
Why not just use sprintf()? That should be much easier than doing it yourself.
perldoc -f sprintf
--
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152
> -Original Message-
> From: Gufranul
omain ${dom}
done
That's it!
------
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152
> -Original Message-
> From: John B [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 21, 2003 9:57 AM
> To: [EMAI
Look at the Mail::Sendmail module. This will do more than you could ever
want...well...maybe.
Anyway, Tom, it'll send attachments.
--
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152
> -Original
the other
hoops I had to jump through!
I never like using the reserved variables (aside from $_) if I can help it. My script
made me feel dirty for looking at the internals like that!
--
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San Diego, CA 92127
I figured it out, nevermind!
If anybody already replied and it just hasn't made it through the mail servers yet,
thanks anyway!
--
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152
> -Original Message
latantly wrong? Is there a better way to do this? Does anybody need more
information?
------
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
(FH,$data) || die "could not open $data $!";
while( ) {
my( $k, $v ) = split /,/;
$prices{$k} = $v;
}
close FH;
for my $key (keys %prices) {
print "$key = $prices{$key}\n";
}
------
David Olbersen
iGuard Engineer
11415 West Bernardo Cou
Ex: $fileName = "File";
> $var = '1>>$fileName';
Do you just mean something like:
$filename = "File";
$var = "1>>$fileName";
? Notice the double quotes (which means "put the value of $fileName") on the second
line.
Quoting issues,
I think you meant:
perl -MCarp -e "croak('croaked')"
------
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152
> -Original Message-
> From: Brett W. McCoy [mailto:[EMAIL
Change your first line to
#!/usr/bin/perl
insetead of
#!/usr/bin/perl
(take out the leading space)
That's causing your shell to think it's a bash script, instead of perl, hence the
errors.
------
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San
Outstanding, exactly what I was looking for.
Thank you very much!
--
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152
> -Original Message-
> From: R. Joseph Newton [mailto:[EMAIL PROTECTED]
> Sen
ase64 encoded version of a 1k file still take up 1k?
--
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ith your script.
--
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152
> -Original Message-
> From: Francesco del Vecchio [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 14, 2003 8:16 AM
> To: [EMAIL PROTECTED]
> Subject
Like with Net::FTP?
--
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152
> -Original Message-
> From: Luinrandir Hernsen [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 13, 2003 7:13 AM
> To: [EMA
Rich,
I know for a fact that you can generate any of the formulas and data you might need
with Spreadsheet::WriteExcel -- I'm not so sure about the graphs though. I think those
would still need to be done manually.
--
David Olbersen
iGuard Engineer
11415 West Ber
Peter,
Outstanding! Thank you VERY much!
*sniff* I love CPAN *sniff*
--
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152
> -Original Message-
> From: Peter Scott [mailto:[EMAIL PROTECTED]
> Sent:
Since you haven't provided any code, I can't either.
Read up on 'split' though, that should help quite a bit.
------
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152
> -Original Message---
n't found anything like that. Is this just a
bad idea that can't be done?
--
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Dan,
return ($_[0] =~ s/^\<|\>$|\n|\r|\s$//g)[0];
?
--
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152
> -Original Message-
> From: Dan Muey [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 1
ean by "on one line?" do you mean without \n or \r's anywhere in the string?
------
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152
> -Original Message-
> From: Dan Muey [mailto:[EMAIL PROTECTED
%domains, and anytime $domains{$key} == 1, print it out!
--
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152
> -Original Message-
> From: Jay Kidd [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 11, 20
On Fri, 8 Jun 2001 [EMAIL PROTECTED] wrote:
> Gurus,
> perldoc -f map says,
>
>
>-
> map BLOCK LIST
> map EXPR,LIST
> Evaluates the BLOCK or EXPR for each ele
On Thu, 31 May 2001, Brian Shoemaker wrote:
> I've never used the maxSplit parameter in my scripts. By not using the
> maxSplit parameter am I slowing things down?
As per `perldoc -f split`
If LIMIT is specified and positive, splits into no more than that many fields
(though it may split into f
I'd just like to say that I'm really impressed with how quickly you can get a
question answered on this list. Keep up the good work everybody!
-- Dave
On Thu, 31 May 2001, Jeff Pinyan wrote:
> Mortal::Kombat (by me) allows you to say:
>
> flawless victory; # to end a program successfully
>
> and
>
> fatality "you have been thoroughly thrashed"; # like die()
Oh japhy, you rule.
`perl -MCPAN -e shell;` here I come!
-- Dave
On Thu, 31 May 2001, Henk Klos wrote:
> I have just downloaded and installed the latest version of Perl for WinNT.
> Followed all the instructions, associated .pl with perl.exe, etc etc.
> However, not one sample htm file from the "eg" directory is working.
> What did I forget???
Did you forget
36 matches
Mail list logo