Ask a Question related to PERL Miscellaneous, Design and Development.
-
Dan Jacobson #1
Help me beef up my cruddy program
Help me beef up my cruddy program. It should then even run on Microsoft,
by the way.
#!/usr/bin/perl -ws
#use strict; #can't use due to -s.
$, = "\t";
$\ = "\n";
my $A = 0.00001549;
my $B = 0.000006521;
my $C = 807.8;
my $D = 248.6;
if ( $I ) {
foreach my $i ( $A, $B, $C, $D ) { $i = -$i }
}
while (<>) {
my @F = split;
print $F[0] - $C - $A * $F[0] - $B * $F[1],
$F[1] + $D - $A * $F[1] - $B * $F[0], "@F";
}
Dan Jacobson Guest
-
htmlText Beef.
Alright.. been working on this all day, so I thought I would consult the brains arround here. The Goal: To have STYLED dynamic text wrap... -
PDF and program won't open; "Error in Acrord32" "This program has performed an illegal operation and
I recently had a browser hijacker. Fixed it with Norton and Lavasoft. Now, after downloading new Reader 6.0, I can't open anything. Only gives... -
No in-program Help
Hi, I've just begun using InDesign CS 3.0.1. I didn't do anything unusual during setup. However, when I click Help > InDesign Help, or press F1,... -
I'm Willing to pay someone to program this
Hi, I saw your post: http://www.programmingtalk.com/showthread.php?threadid=7136 I'm in the need of a programmer who can write a little script... -
PHP POS program
Anyone know where I can download a demo point-of-sale program from? preferably written in php and preferably a point-of-sale designed for... -
Uri Guttman #2
Re: Help me beef up my cruddy program
>>>>> "DJ" == Dan Jacobson <jidanni@jidanni.org> writes:
DJ> Help me beef up my cruddy program. It should then even run on Microsoft,
DJ> by the way.
DJ> #!/usr/bin/perl -ws
DJ> #use strict; #can't use due to -s.
wrong. use vars or our can fix that.
DJ> $, = "\t";
DJ> $\ = "\n";
DJ> my $A = 0.00001549;
DJ> my $B = 0.000006521;
DJ> my $C = 807.8;
DJ> my $D = 248.6;
DJ> if ( $I ) {
DJ> foreach my $i ( $A, $B, $C, $D ) { $i = -$i }
DJ> }
DJ> while (<>) {
DJ> my @F = split;
DJ> print $F[0] - $C - $A * $F[0] - $B * $F[1],
DJ> $F[1] + $D - $A * $F[1] - $B * $F[0], "@F";
DJ> }
if you picked better var names and decribed what this is supposed to do,
someone might help. i won't waste my time on the above.
uri
--
Uri Guttman ------ [email]uri@stemsystems.com[/email] -------- [url]http://www.stemsystems.com[/url]
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- [url]http://jobs.perl.org[/url]
Damian Conway Class in Boston - Sept 2003 -- [url]http://www.stemsystems.com/class[/url]
Uri Guttman Guest
-
Uri Guttman #3
Re: Help me beef up my cruddy program
>>>>> "DJ" == Dan Jacobson <jidanni@jidanni.org> writes:
DJ> Help me beef up my cruddy program. It should then even run on Microsoft,
DJ> by the way.
DJ> #!/usr/bin/perl -ws
DJ> #use strict; #can't use due to -s.
wrong. use vars or our can fix that.
DJ> $, = "\t";
DJ> $\ = "\n";
DJ> my $A = 0.00001549;
DJ> my $B = 0.000006521;
DJ> my $C = 807.8;
DJ> my $D = 248.6;
DJ> if ( $I ) {
DJ> foreach my $i ( $A, $B, $C, $D ) { $i = -$i }
DJ> }
DJ> while (<>) {
DJ> my @F = split;
DJ> print $F[0] - $C - $A * $F[0] - $B * $F[1],
DJ> $F[1] + $D - $A * $F[1] - $B * $F[0], "@F";
DJ> }
if you picked better var names and decribed what this is supposed to do,
someone might help. i won't waste my time on the above.
uri
--
Uri Guttman ------ [email]uri@stemsystems.com[/email] -------- [url]http://www.stemsystems.com[/url]
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- [url]http://jobs.perl.org[/url]
Damian Conway Class in Boston - Sept 2003 -- [url]http://www.stemsystems.com/class[/url]
Uri Guttman Guest
-
Eric J. Roode #4
Re: Help me beef up my cruddy program
Dan Jacobson <jidanni@jidanni.org> wrote in
news:8765k1qkti.fsf@jidanni.org:
What's wrong with it?> Help me beef up my cruddy program. It should then even run on Microsoft,
> by the way.
--
Eric
$_ = reverse sort $ /. r , qw p ekca lre uJ reh
ts p , map $ _. $ " , qw e p h tona e and print
Eric J. Roode Guest
-
Bernard El-Hagin #5
Re: Help me beef up my cruddy program
Eric J. Roode wrote:
> Dan Jacobson <jidanni@jidanni.org> wrote in
> news:8765k1qkti.fsf@jidanni.org:
>>>> Help me beef up my cruddy program. It should then even run on
>> Microsoft, by the way.
> What's wrong with it?
It's lacking in beef, according to the Subject.
--
Cheers,
Bernard
--
echo 42|perl -pe '$#="Just another Perl hacker,"'
Bernard El-Hagin Guest
-
Helgi Briem #6
Re: Help me beef up my cruddy program
On Wed, 10 Sep 2003 10:12:45 +0000 (UTC), "Bernard El-Hagin"
<bernard.el-hagin@DODGE_THISlido-tech.net> wrote:
$beef++;>Eric J. Roode wrote:
>>>> Dan Jacobson <jidanni@jidanni.org> wrote in
>> news:8765k1qkti.fsf@jidanni.org:
>>>>>>> Help me beef up my cruddy program. It should then even run on
>>> Microsoft, by the way.
>> What's wrong with it?
>
>It's lacking in beef, according to the Subject.
Helgi Briem Guest
-
Bob Dover #7
Re: Help me beef up my cruddy program
"Helgi Briem" wrote...
Chuckle... Thanks, I needed that!> "Bernard El-Hagin" wrote:> $beef++;> >Eric J. Roode wrote:> >It's lacking in beef, according to the Subject.> >> What's wrong with it?
Bob Dover Guest
-
Jürgen Exner #8
Re: Help me beef up my cruddy program
Dan Jacobson wrote:
What is this supposed to do?> Help me beef up my cruddy program. It should then even run on
> Microsoft, by the way.
>
> #!/usr/bin/perl -ws
> #use strict; #can't use due to -s.
> $, = "\t";
> $\ = "\n";
By convention people use upper case variables for file descriptions only.> my $A = 0.00001549;
> my $B = 0.000006521;
> my $C = 807.8;
> my $D = 248.6;
Why the condition? The body will never be executed because $I will never be> if ( $I ) {
> foreach my $i ( $A, $B, $C, $D ) { $i = -$i }
> }
true.
Didn't perl warn you about undefined value?
And what is this supposed to do versus what does it do?> while (<>) {
> my @F = split;
> print $F[0] - $C - $A * $F[0] - $B * $F[1],
> $F[1] + $D - $A * $F[1] - $B * $F[0], "@F";
> }
You naming convention is ---shall we say--- suboptimal?
jue
Jürgen Exner Guest
-
Uri Guttman #9
Re: Help me beef up my cruddy program
>>>>> "JE" == Jürgen Exner <jurgenex@hotmail.com> writes:
>> #!/usr/bin/perl -ws
>> #use strict; #can't use due to -s.JE> Why the condition? The body will never be executed because $I will>> if ( $I ) {
>> foreach my $i ( $A, $B, $C, $D ) { $i = -$i }
>> }
JE> never be true. Didn't perl warn you about undefined value?
conditional tests don't warn on undef. and his comment on strict and -s
tells me he was passing -I on the command line and -s would then set $I
which would negate the 4 values.
JE> And what is this supposed to do versus what does it do?>> while (<>) {
>> my @F = split;
>> print $F[0] - $C - $A * $F[0] - $B * $F[1],
>> $F[1] + $D - $A * $F[1] - $B * $F[0], "@F";
>> }
JE> You naming convention is ---shall we say--- suboptimal?
and he still hasn't responded so i guess a hit and run troll. notice his
other post which made some useless comment on sub locations.
uri
--
Uri Guttman ------ [email]uri@stemsystems.com[/email] -------- [url]http://www.stemsystems.com[/url]
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- [url]http://jobs.perl.org[/url]
Damian Conway Class in Boston - Sept 2003 -- [url]http://www.stemsystems.com/class[/url]
Uri Guttman Guest
-
Tassilo v. Parseval #10
Re: Help me beef up my cruddy program
Also sprach Uri Guttman:
>>>>>> "JE" == Jürgen Exner <jurgenex@hotmail.com> writes:It was a question about where to place subroutine-definitions. Looking>> >> while (<>) {
> >> my @F = split;
> >> print $F[0] - $C - $A * $F[0] - $B * $F[1],
> >> $F[1] + $D - $A * $F[1] - $B * $F[0], "@F";
> >> }
> JE> And what is this supposed to do versus what does it do?
> JE> You naming convention is ---shall we say--- suboptimal?
>
> and he still hasn't responded so i guess a hit and run troll. notice his
> other post which made some useless comment on sub locations.
at other languages (where the place of the definition could matter; for
Perl it even does matter when using prototypes), it wasn't quite so
useless.
Tassilo
--
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus}) !JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexi ixesixeseg;y~\n~~dddd;eval
Tassilo v. Parseval Guest
-
Dan Jacobson #11
Re: Help me beef up my cruddy program
I have added beef kindly provided here to
[url]http://jidanni.org/geo/taiwan_datums/programs/twd6797thl[/url] , thanks.
The only worry left is will
#!/usr/bin/perl -ws
work for my Microsoft pals? If not, how do I make a portable version?
perldoc perlrun shows what -n, -p are equivalent to, but not -s.
Do I just do $^W=1 for -w too?
Dan Jacobson Guest



Reply With Quote

