itute_lines ($data, qr/^foo (whatever) bar$/mge, '"bar $1 baz"');
# /e modifier not accepted
Any hints?
--
Josef Wolf
j...@raven.inka.de
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
On Nov 13, 4:56 pm, [EMAIL PROTECTED] (Deviloper) wrote:
> I have a SQL-Statement with a Regular Expression and I want to use a scalar
> in that expression: (Looking for something like "$tool =~ m/\Q$x\E/" )
>
> #Find tools with xx in the name:
> $dbh->prepare ("SELECT name FROM toolbox WHERE
Take some SYS Admin classes.
Once you have completed the training, your questions should have answers.
Wolf
Jyotishmaan Ray <[EMAIL PROTECTED]> wrote:
>
> Dear Wolf
>
> It still has not solved my problem completely,
>
> The output is shown below :-
> dr
your sys admin manuals and the manual pages for chown.
Once you have fixed your errors, the command will work. Unitil you have fixed
your errors though, the issues will remain.
Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
try using:
chown $id:$gid $dir
so that it would be
chown 3051:3051 /home/users/s01-5-097 (or whatever)
HTH,
Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Jyotishmaan Ray <[EMAIL PROTECTED]> wrote:
>
> Dear All,
>
> I am a new bie in perl. I have to create the home directories of 424 students
> in a server machine.
>
> The path of the home directory would be :-
>
> /mnt/btech/formatted-rollno.
>
> where formatted-rollno ="s08-1-5-097"
>
ns in the correct locations, it will fail with PHP,
Perl, Ruby, FTP, etc.
Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
-list appropriate joke or OT post) then that person should be able
to click REPLY-ALL and get the list in the response.
But that's just my guess..
I am on a number of lists that require you to click REPLY-ALL if you want the
list to get the response. It just depends on the thought proce
> Is there a 'bible' out there to read?
Depending on you level of faith:
"learning perl" by randal schwartz & tom phoenix
"the camel book" by Larry wall
bless you, wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
, canine, ca.e.02
elsif ($file =~ /(^cane$)|(canine)|(ca.e.02)/){ print "$file\n"; }
}
#wb: same as above, | lists alternatives, ie either "cane" or "canine" or ..
^ matches beginning of word, $ matches end
Cheers, Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
emails to be masked in that obj?
Does anybody
- know where to find documentation an a PDF::API2::Content::Text obj?
- know why ma CAM::PDF call end in an endless loop
- have any other idea how to replace certain strings in a pdf?
- know a docu on how pdf works - which I obviously dont k
ocess.
Set the responses in an array and just walk the array for a quick and dirty
solution.
Bobby <[EMAIL PROTECTED]> wrote:
> Thanks for both of your suggestions. I've tried them both but still getting
> same result. Any other suggestions?
>
> Thanks.
>
&
Bobby <[EMAIL PROTECTED]> wrote:
> Wolf,
>
> I still don't understand, so set my $strB = "$strA($count)"; ? That didn't
> worked.
>
> Wolf <[EMAIL PROTECTED]> wrote:
> Bobby wrote:
> > Hi all,
> >
> > I
strA instead of $strA($count) which is
where you are getting hosed up.
My perl server is down or I'd play with the code a bit to get it the exact
answer, but that should point you in the right direction.
HTH,
Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
ll also want to get php and mysql from http://www.php.net and
http://www.mysql.com
HTH,
Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
I need to get back to an installed Windows Perl environment. What's the
best free option available out there, that everyone would recommend? I can
do installs without too much issues, so installer doesn't matter, but ease
of use does.
Thanks,
Robert
---
Outgoing mail is certified Virus Free.
Ch
I need a site spider to stay in the same domain, but follow all links
(saving all files encountered) for saving an entire business site. I
have been looking around but have not found the one I am looking for,
can anyone help? It can be PERL or Windows or PHP, it just needs to be
locked to the sam
e you want to work on using DBI you further need the
appropriat DB driver module:
DBD::InterBase for Interbase and Firbird RDBMS available via CPAN.
Enjoy - Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> &
want to work on using DBI you further need the
appropriate DB driver module:
DBD::InterBase for Interbase and Firbird RDBMS available via CPAN.
Enjoy - Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
past the first steps: look at the bioperl modules at cpan and at
www.Bioperl.org
Enjoy -Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
past the first steps: look at the bioperl modules at cpan and at
www.Bioperl.org
Enjoy -Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
onsiderations you'll want to make.
...and at least the scripts are available on the net:
http://modperl.com:9000/perl_networking
Have fun, Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
you create zombies if you dont handle the exit status of you child by
either wait()ing or setting the signal handler? An what does that zombie do
anyway.
Thx, wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
> does, but I'm not entirely sure why it does it.
>
> Also, is there any way I can self-contain the output from each child
> process?
what about prependin a "$$ says:" to each line of child output and doing a
m // in the parent process?
(Not to smart but all I can come u
On Monday 01 March 2004 02:06, wolf blaum generously enriched virtual reality
by making up this one:
> On Sunday 29 February 2004 17:20, [EMAIL PROTECTED] generously
> enriched virtual reality by making up this one:
>
> Hi
>
> > I have a script that processes a form input.
x27;, -values=>['take','delete']),
$p->submit,
$p->end_form,
$p->end_html;
}
---snap---
prints a form with two radiobuttons (in the same group, 'radio') if the script
s caled without parameters.
If parameters are returned, $text is set to the content of
On Thursday 26 February 2004 12:28, Henry Todd generously enriched virtual
reality by making up this one:
> On 2004-02-26 00:43:21 +, [EMAIL PROTECTED] (Wolf Blaum) said:
> > As I understand Biology, there is 4 nucleotid acids which gives 4**2
> > combinaions for dupplets. So
-mail in the
> "emails" array based on a partial match?
>
You could replace
foreach (@exclude) { exists $found{$_} and delete $found{$_}; }
with
foreach my $key (keys %found) {
foreach (@exclude) {
delete $found{$key} if $key=~/$_/;
}
}
and add zappod to @exclude (no xxx
size} - that would even make the thing usable for proteins
by changing the character class to the protein alphabet
But im getting OT her - maybe I should have done something else for a
living:-)
Enjoy (and reproduce), Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
ODs 6 MODs 7 doesnt MOD it.
---snap---
on my box.
Is that what you want?
May I ask what you are planning to do?
Enjoy, Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
m a socket is no more difficult than reading from a file.
and: www.perldoc.com
Enjoy, Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
efined value". Now I'm
> really confused. Why would passing the object work, but passing the
> reference and then dereferencing in the sub doesn't?
my fault:
my $input = ${$_[0]}->get();
should work.
I usually use something like :
my $passed_ref=shift;
and then work fro
gt;'Get Data',-command=>sub{compute(\
$ent)})->pack(-side=>'top');
and use $$_[0]->get in compute
OR:
associate a (global) variable with the entry widget in line 1 like:
my $entryvar;
my $ent =$right->Entry(-width=>8,-background=>'white', -
arameter to the sub that tells it?
Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
1]or use a hash instead:
$file_name{102}="whatever/filename/you.want";
I suggest you tell us, what the logic behind all these different files is, ie,
what goes where of which cause: maybe someone can come up with a hash
structure that incoorporates this knowledge.
Dont open and clos
Who in their right mind would walk into a courthouse and tell the judge
they were trying to break into a computer system (which in and of itself
holds MANY penalties because information on a company system is
invaluable per previous court cases) and say that they lost data on
their system when thei
Nah, because the only ones who receive the file are those attempting to
do harm to my system. Granted I could make it go to a warning page,
which after a few seconds dumps them to the other page, thereby giving
them a warning before I fire the shot, just like a trespasser in my
house. Do I shoot
g BNF. How can I implement this BNF and
> parse a message that satisfies this BNF in perl ? Any suggestions would be
> of great help to me.
Maybe Config::Natural is good to you.
Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
For Quality purpouses, wolf blaum 's mail on Friday 06 February 2004 20:15 may
have been monitored or recorded as:
> easy: (notice: thats the same script as priviously but has the parse in a
> sub:)
>
> ---snip---
> #!/usr/bin/perl
>
> use strict;
> use warnings;
&g
if($line =~ /^\s*(\w+)\s*(.*)\s+(sip\/\d+\.\d+)\s*\r\n/i)
Do you have the \r\n at the end of $line?
Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
For Quality purpouses, LoneWolf 's mail on Friday 06 February 2004 16:57 may
have been monitored or recorded as:
> I've been working with this since wolf and jeff and john sent me some
> stuff, I think I actually based everything on wolf's code excerpts. I'm
> sure
, via email).
If frequently, then you might not want to run arround and change your local
scripts everytime - see first ideas.
You see: it gets out of hand - i better stop here.
good luck, Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<h
For Quality purpouses, wolf blaum 's mail on Thursday 05 February 2004 06:07
may have been monitored or recorded as:
> The script reads all files in the sql subdir of your home dir and produces
> the corrosponding filname.out in your homedir.
shame on me: of course it reads all the f
For Quality purpouses, Lone Wolf 's mail on Thursday 05 February 2004 04:23
may have been monitored or recorded as:
Hi
> Thank goodness I never said I had perfect code, because I would
> definitely be lying.
no worries - I post code to get feedback. Thats the whole ideaof learni
ugh each element and blank the out?
"...making easy thigs easy and hard things possible" - heavans no!
wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
I tried the my @fields and I did not get it to work, probably because my
coding skills have not improved enough lately to be worthy of perl.
Thank goodness I never said I had perfect code, because I would
definitely be lying.
I attached 2 files, one the beginning data, the other the .sql file that
d it in the linear way: Mastering regular
expressions by Jeffrey Friedl
Not to forget: perldoc perltoc or www.perldoc.com
and The Hitchhickers Guide to the Galaxy and Last Chance to see by Douglas
Adams.
I guess others would recomend The Lord of the rings too.
Good night:-)
Wolf
--
For Quality purpouses, Lone Wolf 's mail on Thursday 05 February 2004 00:52
may have been monitored or recorded as:
> I'm back to dealing with the main issue of a badly formatted file being
> brought down from an archaic system and needing to be cleaned up before
> being passed
I'm back to dealing with the main issue of a badly formatted file being
brought down from an archaic system and needing to be cleaned up before
being passed to another user or a database table. I have the code
below, which pulls the whole file in and parse it line by line. That
problem is still t
to set the timing.
That works: no clue why, bu a great tip. Thanks.
Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
e outputs on both, but the one in the listbox is way slower than
the one to the console. However, the relation seams to be random (ie there is
no, say constant 5 line adtvantage).
I also tried the
tie @array, "Tk::Listbox", $listbox in &start and only call
$listbox->see('end') in &dosomething with the result, that I get to see the
whole output in the listbox at once and only when the callled script is
finished.
Any Idea?
Thanks a lot,
Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
r scripts portable (eg, for the users of this list).
Enjoy looking around,
Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
m using the xitami webserver on WinOs.
Dont ask me were that problem comes from - no clue:-)
Hope that works,
Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
t; $name variable, along with the names of the second and third parameter. So
> the value of $name is:
>
> John Doe [EMAIL PROTECTED] message=This is the message
>
> Note that the first parameter's name does not appear.
What does your tag look like?
Wolf
--
To unsub
ck your GUI together and focus on the logic. Neat thing.
As Joseph was pointing out, examples in the Tk docu are an endangerd species:
Mastering Perl/Tk by Steve Lidie and Nacy Walsh is an extended zoo of these.
Enjoy clicking around, Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For add
y there (by either doig it server side in your script or using a
little ugly javascript client side).
Hope thats a start, Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
are with "require",
which can do a similar check at run time.
There is tons more infomation of how use/require are simliar/different.
Enjoy. Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/
erl has never
felt the need to use this form of "goto" (in Perl,
that is--C is another matter). (The difference
being that C does not offer named loops combined
with loop control. Perl does, and this replaces
most structured
For Quality purpouses, Rob Dixon 's mail on Tuesday 27 January 2004 00:30 may
have been monitored or recorded as:
> The right conclusion for the wrong reasons Wolf! The spaces are the result
> of interpolating the array into a string, and the presence of a newline on
> each ar
d that.
> > Or did I totaly miss something.
>
> Maybe. I'm not sure where you're misunderstanding what I wrote. Anyway, I
> hope this helps.
ok - I think we are talking about the same thing here.
thx, wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addition
>
> @arary[3...] but this doesn't work?.
What about @array[3..$#array]
PS: @arary = typo?
Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
e eleent as a convienience for people who
dont have a "\n" at the end of their emelents.
hth, wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
spect the ambivalence of what they
write. But from time to time, Perl's notions differ sub-
stantially from what the author honestly meant.
-
This is one of the latter cases.
Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
module status, youll find a nice table telling you which
modules work in which version of activestate perl.
There is a lot of modules that dont work with 5.8. yet (like
Mail::POP3Client).
Good luck, Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
se dishes at all.
Have a nice weekend, Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
base?
I didnt find a way to do the dishes yet, anything else I ever tried works in
perl.
Just give us some more info.
Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
end while
print "@email"; #last line in script
-
On my box that prints the 2 emails you wanted.
I hope I didnt get something totally screwed.
Let me know if that does it or not. Thx,
Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
# and I'm not sure this would even
> work.
as Dan said:
next FILE2;
will do the job.
> else{
> print "$file2 \n";
> }
> }
> }
This doesent do what I assume you want: when you place the print in the inner
loop.
Just look at the link above.
Hope thats a start, Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
n a newsgroup, since there is the one
asking, who is learning too, whom you dont want to confuse with "slightly
right" answers.
Nevertheless Im happy it seems this is a group were you can even learn how to
explain (and what the group-iquette is anyway).
Thanks for that,
Wolf
--
ailable. Visit http://insidersadvantage.com for
> details."
Uh, given from your question, I better dont,, eh?
Good luck, Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
command line args with the
getopt:: modules from CPAN.
Also take a look at perldoc perlvar for detailed info about @ARGV, ARGV and
$ARGV.
Hope that helps, Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
I am transferring the data from a Redhat 9 machine to an IIS server run
by my ISP. I just tried running rsync and it was not responsive (left
it on overnight in fact to give it time to try). :(
Thanks!
Robert
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAI
I am in dire need of a script that will upload everything from one
server to another one that I can cron. Right now I have to do it by
hand and with more and more updates being done to the site, I need a way
to do it seamlessly. One that checks dates against each other would be
cool too. i.e.: i
:)
Nevermind, great skiing over there! Send me a mail in german (or austrian:-)
if you need further help.
Hope thats a start, Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
then
foreach bfile in B-file-dir
foreach b-id in Bfile
foreach a-id in Afile
print to Cfile and next Bfile if a_id eq b_id
thank a lot, wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/>
t; to start a new row.
>
> I have included the sample data (results from extraction) as a attachment.
>
I didnt find your privious thread so i might leave the calls of either way up
to someone who knows that code.
wolf
ps: hope you arent a cowboys fan:-/
--
To unsubscribe, e-m
form.
However:
> Second attempt to identify atts via Mail::Audit::Attachment fails too.
>
That still holds valid: I cant the heck use te Mail::Audit class as I would
like to: seems like I cant use it at all...
Whats wrong here? My code? My understanding? My carma?
Thanks, Wolf
--
To uns
s of the retrieved messages do carry a "MIME-version: 1.0" line
as required by Mail::Audit::Attachment.
All the other print froms and so work fine
What am I doing wrong?
Better solutions?
Thanks a lot, Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
:
%e a floating-point number, in scientific notation
%f a floating-point number, in fixed decimal notation
%g a floating-point number, in %e or %f notation
Just in case: scientific notation is something like XeY which means X times 10
to the poxer of Y (power first!)
HTH, wolf
:
%e a floating-point number, in scientific notation
%f a floating-point number, in fixed decimal notation
%g a floating-point number, in %e or %f notation
Just in case: scientific notation is something like XeY which means X times 10
to the poxer of Y (power first!)
HTH, wolf
-
$data2='Most popular title searches:"Enterprise" (2001)"';
$data2 =~ /popular title searches:<\/p>/;
print $1;
endSnip---
prints 0244365
If that's what you are looking for.
If you realy have the html in $_, why do you bind $data2 to the regex?
That way you tr
[EMAIL PROTECTED] (Michael R. Wolf) writes:
> I'd like a few volunteers to take a test that I've put
> together for an "Introduction to Perl" class that I teach.
> If you are a beginner or recent "graduate" of an intro
> course and have a few minutes,
e of reusable
subroutines and methods. I often think, "How do I want to
return false/failure? There's only 4 of 'em, which one
makes most sense in this context? Now that I've figured out
the false/failure mode, the true/success value is much
easier".
--
Michael R. Wolf
All mammals learn by playing!
[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED] (John W. Krahn) writes:
> "Michael R. Wolf" wrote:
> >
> > [EMAIL PROTECTED] (John W. Krahn) writes:
> > >
> > > Are you sure there are only three? :-)
> > >
> > > $ perl -le'
> > > print qq(undef is
[EMAIL PROTECTED] (John W. Krahn) writes:
> "Michael R. Wolf" wrote:
> >
[...]
> > Any value that is not false is true. What 3 values indicate
> > false?
>
>
> Are you sure there are only three? :-)
>
> $ perl -le'
> print qq(undef is
[EMAIL PROTECTED] (Peter Scott) writes:
> At 01:15 AM 2/2/2002 -0500, Michael R. Wolf wrote:
>
> >I don't usually give quizes at the end of class, but a
> >client of mine has requested it. (Required it in fact. No
> >test, no payment!)
> >[snip]
> >
ame of an internal member. Keep it balck-box like this
sub size_of_internal_encapsulated_member {
return scalar @arr;
}
Because this is a class method, it's not even necessary to
pull off the $self parameter. The purpose of the method is
just to encapsulate the implementation.
--
Michael R. Wolf
All mammals learn by playing!
[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
1: open (INFILE, "report.txt" ;
2: while () {
3: $line =~ /\"(.+?)\"/ ;
4: $YourTextBetweenTheQuotes = $1 ;
5: # Do whatever you want
6: }
7: close (INFILE)
Seems that a WinDOS file system insinuated itself on your
Perl keywords
--
Michael R. Wolf
Al
to an "Introduction
to Perl" class.
Thank you very much for your assistance,
Michael Wolf
/\
| \ /\ /\ /\ /\ /\ /\ /\ /\ /
gt; print ++($foo = 'a0'); # prints 'a1'
=> print ++($foo = 'Az'); # prints 'Ba'
=> print ++($foo = 'zz'); # prints 'aaa'
=>
=> The autodecrement operator, however, is not magical.
I guess by "within its range" imp
tter. I use all the tools I can get.
--
Michael R. Wolf
All mammals learn by playing!
[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED] (Ronald Yacketta) writes:
> This works great with one exception... the two values in the sed need to be
> passed into the script...
>
> IE:
> changedbsid.pl OLDSID NEWSID filename(s)
>
> could be ran against 1 or more files at a time.
>
> I havethis which works like a champ o
[EMAIL PROTECTED] (Michael R. Wolf) writes:
> Other alternatives include
> #! /usr/bin/perl -w -i
> #! /usr/bin/perl -w -i .bak
> $^I = undef;
Oops! May have been misleading. Here's commentary on
alternatives.
$^I = ''; # in-place, but no backup
$^I
ple loop, it's not a big deal. Start
nesting the loops, doing a copule 'o conditionals, throw a
few "my" variables in one block (but try to use 'em in
another) and the value of well-formatted code becomes real
important.
--
Michael R. Wolf
All mammals learn
EDIT The current value of the inplace-edit
extension. Use undef to disable inplace
editing
--
Michael R. Wolf
All mammals learn by playing!
[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ferences) into what's more comfortable (arrays). Do it
often enough and you won't *need* the intermediate step any
more (like me) though you'll have the freedom to *choose*
either way (like me).
--
Michael R. Wolf
All mammals learn by playing!
[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
handler;
If you merely "return" from the handler, the interrupt will
get caught, handled, but *not* exit your program. Some
times this is good behavior -- a C-c can do a "reset", for
instance.
Check out "stty -a" from the command line. C-c is probably
mapped to INT
his is in _list_ context.
> my @line =;
The original code was in _scalar_ context.
> > my $line = ;
--
Michael R. Wolf
All mammals learn by playing!
[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
de wrong, you've
messed it up for good. Keep backups. This is a very
*powerful* statement. In the right hands it's very good,
else it's very bad
Something like this might work.
perl -e s/_VALUETEST/_QAP2/g -i original.scr
--
Michael R. Wolf
All mammals learn by playing!
[EMAIL PROTECTED] (John W. Krahn) writes:
> "Michael R. Wolf" wrote:
[buggy code deleted ...]
> $ perl -le'
> @fred = qw(1 3 5 7 9);
> sub total {
> my $sum;
> $sum += $_ foreach (@_);
> }
# undef from final foreach always returned!!
1 - 100 of 147 matches
Mail list logo