the line ... now ... how do I
test each value ... ?? I will try Andrew approach !!
Thanks in advance
2014-12-30 5:40 GMT-03:00 Andrew Solomon :
> Hi Alan
>
> This is the module I'd use for it:
>
> https://metacpan.org/pod/Config::Tiny
>
> The simplest approach would be to:
&g
Hi !
I have the Idea to make a perl script (better than in bash) to make some
configuration on linux.
I think to have some files like param.txt with some lines like:
param_one = ZZZ XX VV
param_two = Z
param_three = X
so need to check if param_one is in some_file.conf and if it is the
my $select = 0;
for ( my @elems = split /\s/ ) {
if ( $elems[0] ne $_ ) {
$select = 1;
}
}
$select;
} @array;
Regards,
Alan Haggai Alavi.
--
The difference makes the difference
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional comman
(@_);
In the above line, `shift` will return just the first element from the
@_ array. $y will therefore be undefined. The line should be rewritten
as:
my ( $x, $y ) = @_;
Relevant documentation: `perldoc -f shift` or
http://perldoc.perl.org/functions/shift.html
Regards,
Alan Haggai Alavi.
--
27;bar', 'baz' ] ), '$value = [ "bar", "baz" ]' );
@values = $obj->get();
ok( eq_array( \@values, [ 'bar', 'baz' ] ), '@values = ( "bar", "baz" )' );
__END__
Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
recommend from their experience.
Thank you very very much in advance for your time and comments. Have a very
nice day.
Hello, Francisco,
Padre, the Perl IDE, uses wxPerl and is under active development. The
latest Wx was released on 06th of June 2011. I recommend it.
Regards,
Alan Haggai
Hello Parag,
> Could some please suggest any good online resources on learning CGI
> programming with Perl
Curtis "Ovid" Poe's CGI course is popular:
http://web.archive.org/web/20070709150107/http://users.easystreet.com/ovid/cgi_course/
Regards,
Alan Haggai Alavi.
--
The
Hello Emeka,
> I am thinking of check out GUI ... so I would need to know where to start
> off. Is there a GUI module with Perl? Or am I going to pull one from web?
Check out WxPerl. Padre, the Perl IDE, uses WxPerl for its GUI.
You will have to install `Wx` from CPAN.
Regards,
Alan
d why it is always good to label loops that use `last`, `next`
or `redo`.
Thank you. :-)
Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Now I want to remove the value
> arr[4] and arr[5]. So how it can be done so that $#arr would tell 3.
You can use the `splice` function (read: `perldoc -f splice`) for this:
splice @array, 4, 2;
Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Hello Anant,
Please read:
perldoc -q 'certain element is contained in a list or array'
or
http://bit.ly/o9uKat
Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: b
my @array = qw( foo bar quux );
my $item = 'bar';
if ( first { $item eq $_ } @array ) {
print "Item found: $item\n";
}
Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
ur program can be rewritten as:
print join ', ', 0 .. 7;
Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
p you get started.
Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
latter does not
import any function except for the ones that have been explicitly listed with
the command switch.
> which perldoc document is it get descripted in?
Command switches are documented in `perlrun`.
Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
--
To unsu
interpreter.
Consider a script named main.pl which can be executed under unix-like systems
as:
perl main.pl
or
./main.pl # system checks the shebang line for the interpreter to use
For more information: http://en.wikipedia.org/wiki/Shebang_(Unix)
Regards,
Alan Haggai Alavi.
--
The difference
Hello,
> foreach my $name (split (/, */, $names)) {
Here, the scope of $name is limited to the foreach loop and not outside it.
So, you will have to declare the variable again for use outside the loop.
Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
--
all?
You may try installing Strawberry Perl - http://strawberryperl.com/
Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Hello Jyoti,
Please give me any link or any tutorial which will be helpful for
preparation of PERL interview.
Please read `perldoc perlfaq` (http://perldoc.perl.org/perlfaq.html). It
is a collection of frequently asked questions which will certainly help
you at an interview.
Regards,
Alan
n build one.
As an aside: I am sorry if any uneasiness was caused by my statements.
This was inevitable.
A proverb for the thoughtful: "Prevention is better than cure".
Regards,
Alan Haggai Alavi.
--
The difference makes the difference
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Hello Bruno,
I'm looking for a command line tool for Perl source code beautifier.
Have a look at Perl::Tidy. It also includes a script named `perltidy`
which can be run from the command-line.
Regards,
Alan Haggai Alavi.
--
The difference makes the difference
--
To unsubscribe, e
Hello Mike,
Sure enough the module is gone and I can't find it
in ActiveState ppm.
It is not found in CPAN either.
Regards,
Alan Haggai Alavi.
--
The difference makes the difference
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginn
Hello Marc,
What about writing it like this:
open ('FILEOUT', '>>', 'cmdout') ||die "cant open cmdout: $! \n";
Is that O.K.?
You are still using a bareword filehandle.
Regards,
Alan Haggai Alavi.
--
The difference makes the di
Hello Prashant,
Thanx alan..
You are welcome.
please suggest the steps to configure my web server.
It depends on which web server you are using. You will probably find a
cgi-bin directory (in Debian/Ubuntu, Apache's cgi-bin is at
/usr/lib/cgi-bin/) which is configured to serv
ou have to configure your web server to execute CGI scripts.
Regards,
Alan Haggai Alavi.
--
The difference makes the difference
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Hello Mariano,
use List::MoreUtils qw( any each_array );
I was experimenting and forgot to take off `each_array` from the import
list. `each_array` is not used in the alternative solution and is hence
not required.
Regards,
Alan Haggai Alavi.
--
The difference makes the difference
--
To
ever have
> questions about molecular biology and genetics, fire away - I'd love
> to pay the favor back.
Thank you.
Hope this message helps. :-)
Regards,
Alan Haggai Alavi.
--
The difference makes the difference
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
);
my $selected_name = prompt 'Please select one name: ', -menu => \@names;
print "Selected name: $selected_name\n";
=cut code
Regards,
Alan Haggai Alavi.
--
The difference makes the difference
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional com
Hi Sunita,
Thanks Alan . I had got this piece of info from google but I do not
understand clearly what it wants to define . It would be good , if
you can explain bit more .
You are welcome.
The numbers are dependent on the internal hashing algorithm used by perl
of which I am unaware of
sult, since this bucket usage information
is currently not available for tied hashes.
Regards,
Alan Haggai Alavi.
--
The difference makes the difference
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
fig_re('^osvers');
$os_version =~ s/^ osvers= | '//gx;
print $os_version;
=cut
Regards,
Alan Haggai Alavi.
--
The difference makes the difference
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Hello Parag,
perl -MConfig -le 'print "$Config{perlpath}:$^V\n$ENV{SHELL}:
\n/kernel/$^O:"'
=pod code
perl -MConfig -e 'print "$Config{perlpath}:$^V\n$ENV{SHELL}:" . qx{ bash
--version | head -1 } . "/kernel/$^O:" . qx{ uname -r }'
=cut
R
nto a hash, updating the count each time:
=pod code
#!/usr/bin/env perl
use strict;
use warnings;
use Data::Dumper;
my @elements = ( 1, 2, 3, 4, 2, 3, 1, 2, 1, 1, 1, 4, 6, 7, );
my %count;
$count{$_}++ for @elements;
print Dumper \%count;
=cut
Regards,
Alan Haggai Alavi.
--
The difference
'} = $sheet->{'MinRow'};
}
In English:
If $sheet->{'MaxRow'} has a value that evaluates to false, make
$sheet->{'MaxRow'} equal to $sheet->{'MinRow'}.
Though I have left the else clause,
By the way, it is not recommended to use `unless` for an
$variable_1
|| $variable_2.
The same applies to:
**=+=*=&=<<=&&=
-=/=|=>>=||=
.=%=^= //=
x=
Regards,
Alan Haggai Alavi.
--
The difference makes the difference
--
To unsubs
l work to all version of windows.
> Is there a different between using ASCII or UTF-8?
UTF-8 encoding is a super-set of ASCII encoding.
Regards,
Alan Haggai Alavi.
--
The difference makes the difference
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
source code includes UTF-8
if ( $euros eq 'BC€01' ) {
# ...
}
__OR__
if ( $euros eq 'BC' . chr(0x20AC) . '01' ) { # 0x20AC is the
hexadecimal value of €
# ...
}
Regards,
Alan Haggai Alavi.
--
The difference makes the difference
o::Bar->new();
my $package = ref $fob;
{
no strict 'refs';
print Dumper \%{"${package}::"};
}
Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail:
Hi Sunita,
> How can I print parent test script name inside this postrun ?
`(caller)[1]` will return the the parent script's filename inside the
postrun script.
See `perldoc -f caller` for more information.
Regards,
Alan Haggai Alavi.
--
The difference makes the difference
--
To uns
due to the `$`).
`sub is ($$;$)`
Requires two mandatory arguments and an optional one. All of them will
be considered in scalar context.
See `perldoc perlsub` for more information.
Regards,
Alan Haggai Alavi.
--
The difference makes the difference
--
To unsubscribe, e-mail: beginners-unsub
/Shebang_(Unix)
Regards,
Alan Haggai Alavi.
--
The difference makes the difference
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
rnings;
use Unix::Uptime;
my $uptime_hours = Unix::Uptime->uptime() / 3600;
if ( $uptime_hours < 1 ) {
exit(127);
}
Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h
-f $File::Find::name ) {
$size += ( stat $File::Find::name )[7];
}
}
find( \&determine_size, $directory );
$size /= 1024 * 1024;
print "Total size: $size MB\n";
=cut
Relevant documents to read:
`perldoc File::Find` - http://perldoc.perl.org/File/Find.html
`perldoc -f stat`
On Sunday 10 Oct 2010 20:38:32 chillidba wrote:
> Can some body please point me to Perl Thread tutorials.(some pdf with
> examples)
Hi,
perldoc perlthrtut
http://perldoc.perl.org/perlthrtut.html
Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
--
To unsubscribe,
On Sunday 10 Oct 2010 20:38:32 chillidba wrote:
> Can some body please point me to Perl Thread tutorials.(some pdf with
> examples)
Hi,
perldoc perlthrtut
http://perldoc.perl.org/perlthrtut.html
Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
--
To unsubscribe,
On 4 October 2010 09:49, sheikh numan iqbal wrote:
> i want to login and need help on perl...
Hi Numan,
Please let us know where you need help with. Consider expanding the question.
Regards,
Alan Haggai Alavi.
--
The difference makes the difference
--
To unsubscribe, e-mail: beginn
nd's find(). If find() was not
implemented to handle callbacks, the possible way to return encountered
file/directory names will be as an array or hash of file/directory names after
it has traversed and exhausted all possible file/directory names within the
path.
Regards,
Alan Haggai Alavi.
ran,
DBD::CSV is not in core. You can check it yourself by using the
`corelist` command-line frontend to Module::Corelist.
For example:
alanhag...@love:~$ corelist DBD::CSV
DBD::CSV was not in CORE (or so I think)
By the way, why do you resist installing modules from CPAN?
Regards,
Alan.
--
lue;
# @values = ($value);
__END__
Please refer `perldoc -f push` and `perldoc -f unshift`.
Regards,
Alan Haggai Alavi.
--
The difference makes the difference
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
ric expression,
the result will be undef.
> my @elems2 = split(/./,$var);
Again, anything is considered to be a delimiter due to the '.' (match
anything). Thus, again, the result is undef.
> my @elems3 = split(//,$var);
When the pattern is omitted, split splits on whitespace.
Hi,
CPAN::Mini can be used to create/update local mirrors. minicpan script
(http://search.cpan.org/perldoc?minicpan) which uses CPAN::Mini will be
helpful in maintaining a local CPAN mirror.
Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
--
To unsubscribe, e-mail
t wondering if I'm missing out on something with
> unpack...
>
> Thanks!
>
> Ray
Hi Raymond,
Wildcards can be used within the template in pack. There is no need of
the inner loop you have written. For example, to unpack all signed
longs:
my @signed_longs = unpack ( '
Hi Arjun,
>Can someone suggest me some good e-books or tutorials to start
>learning PERL?
Welcome to the Perl world. :-) By the way, the language is named Perl, and not
PERL.
For online tutorials and links to books on the Perl language, you can check:
http://perl-begin.org/
Regards
Win32::Registry. So,
you need to either install it or add it to @INC for perl to find it.
>From checking CPAN, I read that Win32::Registry
(http://search.cpan.org/perldoc?Win32::Registry) is now obsolete use
Win32::TieRegistry (http://search.cpan.org/perldoc?Win32::TieRegistry)
instead.
Reg
Hi Sudheer,
Some links to help you get started:
http://perl-begin.org/
http://learn.perl.org/
Good luck learning Perl. :-)
Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners
Hello Ariel,
You could use either GNU Screen (http://www.gnu.org/software/screen/)
or `nohup` command to run your script.
Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h
rellibmv
Hello Bruno,
Archive::Zip is a pure Perl module. You can download it from CPAN to some path
where you have rw permissions and untar it. Then, modify @INC to use the
library. No need to install it.
Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
--
To unsubscribe
>Who are you talking about? Is Merlyn some nickname I'm not aware of?
Hi,
Merlyn is Randal's nickname.
Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@
Hi,
Windows requires you to use double quotes in place of single quotes. Saving to
a file and executing it is the only way that is cross-platform, I suppose.
Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For
ss you tell it
otherwise. Check if you are using the EXPR form of eval to modify the argument
list.
perl -MData::Dumper -le 'print Dumper \...@argv' @this @should @work
__Output__
$VAR1 = [
'@this',
'@should',
'@work'
]
Hi,
index $s, "e", 3;
This means "position of the first 'e' on or after position 3". The position of
the 'e' is counted from the start of the string. Counting starts from 0.
Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
--
To
y perl 5.10.
http://perldoc.perl.org/perlsyn.html#Switch-statements
Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
is a bit hard to
deploy. However, the advantages outweigh the disadvantage by a considerable
margin.
Regards,
Alan Haggai Alavi.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
rldoc website
(http://perldoc.perl.org/) can be of help as well.
Regards,
Alan Haggai Alavi.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
while () {
@fields = split;
foreach (@fields) {
next if /\d\)/; # no (X86-64)
print "$_\n" if /\d+/;
}
}
__DATA__
Slackware 12.0.0
Welcome to openSUSE 11.0 (X86-64) - Kernel \r (\l).
# end of file marker
--
Alan.
Hi,
Do not use regular expressions to parse HTML. Regexps will break at some
point. Use HTML::Parser.
Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On Fri, May 23, 2008 at 12:15 AM, Alan C <[EMAIL PROTECTED]> wrote:
> On Thu, May 22, 2008 at 5:57 AM, Octavian Rasnita <[EMAIL PROTECTED]>
> wrote:
>
[ . . ]
>Next shows a block or lexical scope (mask does not happen) versus when in
the same scope (in global, not usin
te scope block) where mask can
happen.
#!/usr/bin/perl
use strict;
use warnings;
my $text = 1;
# begin block next
{my $text = 2;
print "In block we have ",$text,"\n";}
# block ended on previous line
# so, next is outside of block
print "1st Outside block we have ",$text,"\n";
my $text = 3;
print "2nd Outside block we have ",$text,"\n";
# end
--
Alan.
by: M Schilli
http://www.google.com/search?q=perlmeister+m+schilli&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
--
Alan.
ach my $line (@weather) {
# = `weather SAC`;
#while () {
my $pid;
my $readme;
$pid = open $readme, "-|", "weather", "SAC" or die "cant fork: $!\n";
print "pid is: $pid\n";
while (<$readme>) {
#print if $line =~ /Weather Conditions at/i .. /=/;
#print "$line" if $line =~ /Weather Conditions at/i .. /=/;
print if /Weather Conditions at/i .. /SAC exec/;
#print if /Weather Conditions at/i .. /^\=$/;
}
#print "\n\n";
#print @weather;
}
# end ---
--
Alan.
---
Ultimately, I want to print the CA (California) zone 17 forecast (southern
Sacramento valley forecast). Probably will knock that $line + 40 down to $line
+ 15 or thereabouts. But, I need to strip the html from $source first.
Thanks.
--
Alan.
tsoever makes it to my Kmail. Ocasionally I log onto www
gmail and "report" spam (the very very very few spam that didn't already get
put into the spam folder).
--
And, yes, the newsgroup post made it to the list -- made it to my gmail
account and got to my Kmail on my Linux KDE desk
ctions.html
http://perldoc.perl.org/perlop.html
http://perldoc.perl.org/perl.html
--
Alan.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
http://perl.plover.com/FAQs/Namespaces.html
http://groups.google.com/group/perl.beginners/search?group=perl.beginners&q=scope&qt_g=Search+this+group
http://groups.google.com/group/perl.beginners/search?group=perl.beginners&q=Global+symbol&qt_g=Search+this+group
--
Alan.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On Monday 26 March 2007 07:32, Dave Gray wrote:
> On 3/25/07, Alan <[EMAIL PROTECTED]> wrote:
> > On Sunday 25 March 2007 18:14, Matt Herzog wrote:
> > > This is all I needed. I swear I had " /($searchstring)/; " in there at
> > > some point b
s even
> > > possible? If
> > > not, is there a way to exclude directories from being returned?
>
> This is all I needed. I swear I had " /($searchstring)/; " in there at
> some point before . . . so if I pass it
>
> -s "\.properties$"
&
if ( /\Q$patc_fil\E$/ ) {
# . . .
}
Someone mentioned the \Q and the \E
I've used them. They work. (above, a line from one of my codes).
--
Alan.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
hello,
Good questions.
> I'm trying to use cmd line perl -e to do some fairly basic sed-style
> find/replace.
Why don't you just use sed for that, if you're not doing the main
program in Perl? Maybe I'm misunderstanding you, but it sounds like
you're saying that you're writing shell scripts in
$bss_sym);
}
}
print @syms_info;
...but I'd like a (somewhat convoluted perhaps) 1-liner w/ perl -e cmd-liner.
Seems like it should be feasible in 1/10th the code.
Any thots?
Many thanks indeed,
Alan
-
ie "Cannot change working directory ", $ftp->message;
#Now list all the files on the remote server and check for
foreach my $file($ftp->ls) {
next unless $file =~ /.+\.md5$/; # .md5
print $file, "\n";
# $ftp->get($file) or die "Get failed ", $ftp->message;
}
$ftp->quit;
}
# end
--
Alan.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Hi.
The orig post of this code did not come to my email -- but the post is on
Google Groups. (I'm emailing).
I got the code (as enclosed below) working when the url is http. But,
ftp://slackware.mirrors.tds.net/pub/slackware/slackware-11.0-iso
(ftp), however, does not work which I'd guess is
.+(ftp\:|http\:)/$1/ and system("wget $_") if /(ftp|http).+\.md5$/;
}
# end
--
Alan.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
$_ .= "\n";
print NEW;
}
close(NEW) or die "cant close $urls4dl: $!";
system("wget -i $urls4dl");
# end
--
Alan.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
>while $. <= 4;
$. is not well-known to many Perl programmers.
for 1 .. 4;
>>> thanks. Above solution is simple & effective. I agree that I was
>>> gratuitously using $. when your solution is far easier to document and
>>> probably safer in my program since I have several filehandles op
next unless ($. > 4); # only do work if on > 4th line
but on a 1 line file thats 9996 wasted operations. In an array I could
simply do: -
for my $ct (4 .. $#trace_data) {
...the syntax for doing the same thing in line by line I/O escapes me? Anybody
know?
Many th
(JNI) back to orig COM/C++ methods are not as attractive
since all the manpower is going into Eclipse Java APIs.
Thanks, Alan
-
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+
countries) for 2¢/min or less.
Tom - Yes I use real values.
Dr. Ruud - You're right... the extra line is useless and I have cleaned it up
accordingly.
Anyways I figured the script out. Here's the final output cleaned up a little
bit.
Thanks for your help.
#!/usr/bin/perl -w
use strict;
use Net::SMTP;
my $mail_server = "
Hey,
I'm trying to send mail over my server (1and1.com). They require smtp
authentication in order to send. I'm using windows XP.
Here is my code:
#!/usr/bin/perl -w
use strict;
use Net::SMTP;
my $mail_server = "mailhost";
my $username = "login";
my $password = "password";
my $msg = "This is
{$a->{typedefName} cmp $b->{typedefName}} @func_recs;
...but with a key-less extra level, how would I go about sorting?
Let me know if insufficient data re the problem has been supplied.
Thanks, Alan
-
Do you Yahoo!?
Everyone is
tpical
server-client network communication procedure. The server script would sit
in a state in which it is waiting for the other side of the socket to be
connect by the client, accept a msg, and then disconnect the client, and
what for another connection.
Alan
From: "William Pauls
was faster.
Thanks again for all the advice. Much appreciated. FYI the script now runs in
1sec on a 9Mb file, as compared to 3min 30s previously!
cheers, Alan
"John W. Krahn" <[EMAIL PROTECTED]> wrote:
Alan Campbell wrote:
> hello folks,
Hello,
> I'm slurp
t welcome. Would also appreciate a brief explanation of
why this reg ex is slow (so I dont screw it up next time!)
Many thanks, Alan
-
New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.
ed entities from the input XML.
I'm open to using a module but pure reg exp (non line-by-line) seems
faster...and speed is important in this case due to filesize.
Grateful for any ideas u may have.
Cheers, Alan
Jay Savage <[EMAIL PROTECTED]> wrote:
On 4/29/06, Alan Campbel
e/narrow my
search string.
Many thanks indeed.
cheers, Alan
-
How low will we go? Check out Yahoo! Messengers low PC-to-Phone call rates.
d to compare your need for this versus your need for SQL and
then choose which one of the two based on what your needs are.
--
Alan.
783 2005-05-17 16:48 libdbh.la*
lrwxrwxrwx1 root root 19 2005-09-27 18:31 libdbh.so ->
libdbh-1.0.so.1.0.0*
[EMAIL PROTECTED]:/usr/lib$
Oh, BTW: alias lsag='ls -la | grep'
--
Alan.
+pseudohash&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-US:official
Google turned up some hits though I not have time to peruse any of the hits.
--
Alan.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
line 409.
Is that above line with foreach is it a shorthand/substitute for:
while ( <$fh> ) {
$plain_text .= $_;
} # end_of_code
??? yes/no ??
--
And, please of course *do* listen to Mr. Clarkson and Shawn Corey's replies on
this thread/issue.
--
Alan.
--
To unsubscribe,
of curiosity though, why not do this:
if ( $var2 eq $var1 )
Wouldn't that achieve what you want?
Alan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
1 - 100 of 192 matches
Mail list logo