Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

perl-beginner · Perl Beginners Mailing List

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 3764
  • Category: Perl
  • Founded: Aug 2, 1998
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 17903 - 17932 of 27465   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#17903 From: Anil <anil_jupiter@...>
Date: Sun Feb 1, 2004 12:30 pm
Subject: Check this Out!!!!
anil_jupiter
Send Email Send Email
 
Make Your Opinions Count! Influence decision makers
(For Indian Citizens Only)

Looking for a source of extra income? There is a huge demand for everyday
peoples to participate in high paying survey opportunities. This is the perfect
opportunity for anyone who wants to work from home, whether you want to work
part-time to earn a little extra cash or are looking for a source of full-time
home employment. They need everyday people to give their honest opinion for
their marketing research, and they are willing to pay you for your time. Click
the link http://recencyinternational.tripod.com/ to start making money from the
comfort of your home! All you have to do is download the form, fill it & send at
:

Recency International
P O Box 3679
Lajpat Nagar
New Delhi - 110 024


along with Registration fees of Rs. 25/- (Kindly add 25/- for Non-Delhi Cheques)
& they will invite you from time to time to participate in our survey programs.
Don't let this oppurtunity slips away from you. They have 3975 Members & they
need more!

Thanx & Regards

Note : If you decide to join please State Reference ID ajn99257. For any
question & comment mail me at anil_jupiter@yahoogroups.com




---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!

[Non-text portions of this message have been removed]

#17904 From: Anil <anil_jupiter@...>
Date: Sun Feb 1, 2004 12:41 pm
Subject: Check this Out!!!!
anil_jupiter
Send Email Send Email
 
Make Your Opinions Count! Influence decision makers
(For Indian Citizens Only)

Looking for a source of extra income? There is a huge demand for everyday
peoples to participate in high paying survey opportunities. This is the perfect
opportunity for anyone who wants to work from home, whether you want to work
part-time to earn a little extra cash or are looking for a source of full-time
home employment. They need everyday people to give their honest opinion for
their marketing research, and they are willing to pay you for your time. Click
the link http://recencyinternational.tripod.com/ to start making money from the
comfort of your home! All you have to do is download the form, fill it & send at
:

Recency International
P O Box 3679
Lajpat Nagar
New Delhi - 110 024


along with Registration fees of Rs. 25/- (Kindly add 25/- for Non-Delhi Cheques)
& they will invite you from time to time to participate in their survey
programs. Don't let this oppurtunity slips away from you. They have 3975 Members
& they need more!

Thanx & Regards

Note : If you decide to join please State Reference ID ajn99257. For any
question & comment mail me at anil_jupiter@yahoogroups.com








---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!

[Non-text portions of this message have been removed]

#17905 From: franki <franki@...>
Date: Sun Feb 1, 2004 5:02 pm
Subject: Sending mail, with an attachments, with limited module options.
frankhauptle
Send Email Send Email
 
Hi guys,

I just knocked up a simple script for a friend which is designed such
that it requires a user to register with the script before it emails
them a file..  The script was successfully working on my server using
Mime::Lite.. However her server has limited options with regards to
installed modules, and this person is a total newbie with no shell
access, so teaching her to install a module into her own account would
be near impossible..

Anyway, I knocked up a little file::find script to work out what modules
she has available to her..  and the only mail (outgoing) related modules
I see in the list are NET::SMTP.
The total module list is below, I have removed a heap that are not
relevant to this question from the list.

Anyway, I looked at using "lib" and including sender.pm in her home
directory.. which I have done before... (thanks Jenda)

but looking in Sender.pm indicates that it needs  MIME::Base64 and
MIME::QuotedPrint to send attachments...
I didn't see either in this list of modules.. (it seems the ISP has
intentionally left out mailing modules.. as the rest of the list is
quiet comprehensive..)

So my question is,  what is the simpliest method of sending an email
with an attachment using only the modules displayed in the below list.
(or others like sender.pm that can simply be put onto the host and
"used" with use lib..)

regards

Franki



The installed module list:
---------------------------
/usr/lib/perl5/Quota.pm
/usr/share/perl5/URI.pm
/usr/share/perl5/DebianNet.pm
/usr/share/perl5/URI/mailto.pm
/usr/share/perl5/URI/pop.pm
/usr/share/perl5/URI/_server.pm
/usr/share/perl5/URI/WithBase.pm
/usr/share/perl5/Net/POP3.pm
/usr/share/perl5/Net/Domain.pm
/usr/share/perl5/Net/SMTP.pm
/usr/share/perl5/Net/Time.pm
/usr/share/perl5/Net/NNTP.pm
/usr/share/perl5/Net/Cmd.pm
/usr/share/perl5/Net/Netrc.pm
/usr/share/perl5/Net/FTP.pm
/usr/share/perl5/Net/HTTP.pm
/usr/share/perl5/Net/HTTPS.pm
/usr/share/perl5/Debian/AdduserCommon.pm
/usr/lib/perl/5.6.1/Config.pm
/usr/lib/perl/5.6.1/DynaLoader.pm
/usr/lib/perl/5.6.1/Errno.pm
/usr/lib/perl/5.6.1/Fcntl.pm
/usr/lib/perl/5.6.1/IO.pm
/usr/lib/perl/5.6.1/POSIX.pm
/usr/lib/perl/5.6.1/Socket.pm
/usr/lib/perl/5.6.1/XSLoader.pm
/usr/lib/perl/5.6.1/ByteLoader.pm
/usr/lib/perl/5.6.1/re.pm
/usr/lib/perl/5.6.1/B.pm
/usr/lib/perl/5.6.1/O.pm
/usr/lib/perl/5.6.1/GDBM_File.pm
/usr/lib/perl/5.6.1/DB_File.pm
/usr/lib/perl/5.6.1/NDBM_File.pm
/usr/lib/perl/5.6.1/ODBM_File.pm
/usr/lib/perl/5.6.1/Opcode.pm
/usr/lib/perl/5.6.1/Safe.pm
/usr/lib/perl/5.6.1/ops.pm
/usr/lib/perl/5.6.1/SDBM_File.pm
/usr/lib/perl/5.6.1/attrs.pm
/usr/share/perl/5.6.1/AutoLoader.pm
/usr/share/perl/5.6.1/Carp.pm
/usr/share/perl/5.6.1/Cwd.pm
/usr/share/perl/5.6.1/Exporter.pm
/usr/share/perl/5.6.1/FileHandle.pm
/usr/share/perl/5.6.1/SelectSaver.pm
/usr/share/perl/5.6.1/Symbol.pm
/usr/share/perl/5.6.1/attributes.pm
/usr/share/perl/5.6.1/base.pm
/usr/share/perl/5.6.1/constant.pm
/usr/share/perl/5.6.1/fields.pm
/usr/share/perl/5.6.1/integer.pm
/usr/share/perl/5.6.1/lib.pm
/usr/share/perl/5.6.1/locale.pm
/usr/share/perl/5.6.1/overload.pm
/usr/share/perl/5.6.1/strict.pm
/usr/share/perl/5.6.1/vars.pm
/usr/share/perl/5.6.1/warnings.pm
/usr/share/perl/5.6.1/AnyDBM_File.pm
/usr/share/perl/5.6.1/AutoSplit.pm
/usr/share/perl/5.6.1/Benchmark.pm
/usr/share/perl/5.6.1/CGI.pm
/usr/share/perl/5.6.1/CPAN.pm
/usr/share/perl/5.6.1/DB.pm
/usr/share/perl/5.6.1/DirHandle.pm
/usr/share/perl/5.6.1/Dumpvalue.pm
/usr/share/perl/5.6.1/English.pm
/usr/share/perl/5.6.1/Env.pm
/usr/share/perl/5.6.1/Fatal.pm
/usr/share/perl/5.6.1/FileCache.pm
/usr/share/perl/5.6.1/FindBin.pm
/usr/share/perl/5.6.1/SelfLoader.pm
/usr/share/perl/5.6.1/Shell.pm
/usr/share/perl/5.6.1/Test.pm
/usr/share/perl/5.6.1/UNIVERSAL.pm
/usr/share/perl/5.6.1/autouse.pm
/usr/share/perl/5.6.1/blib.pm
/usr/share/perl/5.6.1/bytes.pm
/usr/share/perl/5.6.1/charnames.pm
/usr/share/perl/5.6.1/diagnostics.pm
/usr/share/perl/5.6.1/filetest.pm
/usr/share/perl/5.6.1/less.pm
/usr/share/perl/5.6.1/open.pm
/usr/share/perl/5.6.1/sigtrap.pm
/usr/share/perl/5.6.1/subs.pm
/usr/share/perl/5.6.1/utf8.pm
/usr/share/perl/5.6.1/Pod/Functions.pm
/usr/share/perl/5.6.1/Pod/Checker.pm
/usr/share/perl/5.6.1/Pod/Find.pm
/usr/share/perl/5.6.1/Pod/InputObjects.pm
/usr/share/perl/5.6.1/Pod/Html.pm
/usr/share/perl/5.6.1/Pod/ParseUtils.pm
/usr/share/perl/5.6.1/Pod/LaTeX.pm
/usr/share/perl/5.6.1/Pod/Man.pm
/usr/share/perl/5.6.1/Pod/ParseLink.pm
/usr/share/perl/5.6.1/Pod/Parser.pm
/usr/share/perl/5.6.1/Pod/Plainer.pm
/usr/share/perl/5.6.1/Pod/Select.pm
/usr/share/perl/5.6.1/Pod/Text.pm
/usr/share/perl/5.6.1/Pod/Usage.pm
/usr/share/perl/5.6.1/File/Spec.pm

#17906 From: "Jenda Krynicky" <Jenda@...>
Date: Sun Feb 1, 2004 5:58 pm
Subject: Re: [PBML] Sending mail, with an attachments, with limited module options.
jendaperl
Send Email Send Email
 
From: franki <franki@...>
> I just knocked up a simple script for a friend which is designed such
> that it requires a user to register with the script before it emails
> them a file..  The script was successfully working on my server using
> Mime::Lite.. However her server has limited options with regards to
> installed modules, and this person is a total newbie with no shell
> access, so teaching her to install a module into her own account would
> be near impossible..
>
> Anyway, I knocked up a little file::find script to work out what
> modules she has available to her..  and the only mail (outgoing)
> related modules I see in the list are NET::SMTP. The total module list
> is below, I have removed a heap that are not relevant to this question
> from the list.
>
> Anyway, I looked at using "lib" and including sender.pm in her home
> directory.. which I have done before... (thanks Jenda)
>
> but looking in Sender.pm indicates that it needs  MIME::Base64 and
> MIME::QuotedPrint to send attachments... I didn't see either in this
> list of modules.. (it seems the ISP has intentionally left out mailing
> modules.. as the rest of the list is quiet comprehensive..)

Then just install MIME::QuotedPrint and MIME::Base64 the same way.
Actually if you happen to have the same version of Perl and OS you
can compile any module on your computer, upload the resulting files
to hers and use lib ...

If the module doesn't contain any XS code then you should be able to
do this regardless of OS and Perl version.

Jenda

===== Jenda@... === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
	 -- Terry Pratchett in Sourcery

#17907 From: franki <franki@...>
Date: Sun Feb 1, 2004 6:50 pm
Subject: Re: [PBML] Sending mail, with an attachments, with limited module options.
frankhauptle
Send Email Send Email
 
Jenda Krynicky wrote:
   > Then just install MIME::QuotedPrint and MIME::Base64 the same way.
> Actually if you happen to have the same version of Perl and OS you
> can compile any module on your computer, upload the resulting files
> to hers and use lib ...
>
> If the module doesn't contain any XS code then you should be able to
> do this regardless of OS and Perl version.
>
> Jenda
>

Thanks, I was hoping that there was an easier way of sending
attachments..  but no matter..
I'll see what I can do.

rgds

Franki

#17908 From: droux@...
Date: Mon Feb 2, 2004 11:18 am
Subject: (No subject)
droux@...
Send Email Send Email
 
#17909 From: "J.E. Cripps" <cycmn@...>
Date: Mon Feb 2, 2004 12:32 pm
Subject: Re:The best book for an extreme Newbie to programming
cycmn@...
Send Email Send Email
 
> From: Brian Gordon <microsteel@...> in forum haec scripsit hodie:
> replying to Augustine <wadunn83@...>
> > I dunno whether ill get attacked for this or not but:
> > I am glad that I didn't try to program all at once with Perl. I would
> > have drowned. I went like this, in this order...

    Brian's braver than I am.  Most ppl can recall a confusing and
    intermittent programming infancy but don't dare to relate the
    gory details, even though discussion would be helpful (I'm
    not sure where, though)

    His is not wildly unusual for ppl those who began
    in recent decade(s)  and at an early age (single-digit)
    But there's no "typical infancy" any more, if there ever was.

    The metaphor of "drowning" is interesting.  I have horrible
    memories of early failure (but not with Perl, because of the
    community support.)

    I'd like to say there's no real reason for fear, come in
    the water's fine (at the shallow end) You won't drown
    (unless you've made representations of skill or committments
    beyond your capacity to fulfill in a fairly limited time.)

    Or maybe another metaphor, flight, "ad astra per aspera"
    Frustrations will crop up, all the time. The earlier flights
    aren't long and you will crash.  But it will be more enjoyable
    long before your skills are stellar.

[BG, recalling a non-Perl language and one of its compilers...]
> > Big mistake. I started out my first programming language with the [a
> > well-regarded compiler] I just couldn't get the compiler to work and as
> > a result I never even got "Hello World!" to work.

     "This is the big hurdle: to leap over it you have to be able
      to create the program text somewhere... run it, and find out
      where your output went. With these mechanical difficulties
      mastered everything else is comparatively easy." Brian
      Kernighan and Dennis Ritchie, in a renowned non-Perl book [0]

   This is  one reason to  recommend Perl. I've installed it from
   a CD several times with no difficulty (although I prefer OSes
   where it's a standard) Not on a Mac, though.

    To recapitulate: text editor (or what you will), perl (lc, the
    interpreter, vide perlfaq1), perl perl (and all the other
    docs)... type the code, run it, and capture and read the error
    messages.  Repeat ad libitum...

Regards CYC/JEC


[0] The C Programming Language, 2nd edition (1988)
Glossarium: astrum, astri: star
	     asper, -era, -erum: stormy, harsh, rude, difficult
--
The scene in NYC: http://www.nyxls.com

#17910 From: Leon <roastin@...>
Date: Tue Feb 3, 2004 2:26 pm
Subject: script problem
roastin
Send Email Send Email
 
Hi everyone,

I am created this script to send e-mails (see below).
I get this error when I try to run it:

Number found where operator expected at
C:\scriptz\test\NEWSCR~1.CGI line 15, ne
ar "The IP address for the interface that caused the
event, or "0"
   (Might be a runaway multi-line "" string starting on
line 7)
         (Do you need to predeclare The?)
String found where operator expected at
C:\scriptz\test\NEWSCR~1.CGI line 16, ne
ar "The NNM management station ID: $ARGV[9] ""
   (Might be a runaway multi-line "" string starting on
line 15)
         (Missing semicolon on previous line?)
syntax error at C:\scriptz\test\NEWSCR~1.CGI line 15,
near "The IP address for t
he interface that caused the event, or "0"
BEGIN not safe after errors--compilation aborted at
C:\scriptz\test\NEWSCR~1.CGI
  line 20.

This is the script. I think it has something to do
with the "'s but I am not sure where I am going wrong.
  Any help would be great.

Thx,

Leon


#!/usr/local/bin/perl
#Send E-mail for Critical Alerts

#Here we define our parameters
$to = 'me@...';
$from = "Openview Server";
$body = "Interface Down:  The ID of application
sending the event is $ARGV[0]
The hostname of the node that caused the event is:
$ARGV[1]
The HP OpenView object identifier of the node that
caused the event is: $ARGV[2]
The HP OpenView object identifier of the node that
caused the event is: $ARGV[3]
The database name is: $ARGV[4]
A time stamp for when the event occurred is: $ARGV[5]
The HP OpenView object identifier of the interface
that caused the event is: $ARGV[6]
The name or label for the interface that caused the
event is: $ARGV[7]
The IP address for the interface that caused the
event, or "0" if unavailable is: $ARGV[8]
The NNM management station ID: $ARGV[9] ";
$subject = "Major Failure segment $ARGV[0] is down";

#Here we use the module pass more specific parameters
     use Net::SMTP;

     $smtp = Net::SMTP->new('10.11.1.134');

     $smtp->mail($ENV{USER});
     $smtp->to($to);

     $smtp->data();
     $smtp->datasend("Importance: High\n");
     $smtp->datasend("From: $from\n");
     $smtp->datasend("To: $to\n");
     $smtp->datasend("Subject: $subject\n");
     $smtp->datasend("\n");
	 $smtp->datasend("$body");
     $smtp->dataend();

     $smtp->quit;


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

#17911 From: Leon <roastin@...>
Date: Tue Feb 3, 2004 2:36 pm
Subject: Re: [PBML] script problem
roastin
Send Email Send Email
 
I figured out my problem.  Sorry for the spam.

Thx again,

Leon

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

#17912 From: Madhu Reddy <saitech74@...>
Date: Tue Feb 3, 2004 8:10 pm
Subject: Diff b/w using "system" command and using ` `(back quotes) in perl
saitech74
Send Email Send Email
 
Hi,
    what is the difference between using "system" call
and using ` `(back quotes) in perl ?

suppose i have followinh shell script

----------t1.ksh-------
#!/bin/ksh

echo "Before BTEQ"

BTEQ <<EOF

   here some commands specific to BTEQ
EOF

echo "After Bteq"
------------- END of ksh ---------
following is my perl script

-----------test.pl---------
print "executing shell \n";

system "t1.ksh";

print "t1.ksh completed";

------- end of test.pl ----------

--------test_1.pl-----------
print "executing shell \n";

`t1.ksh`;

print "t1.ksh completed";

----------- END OF test_1.pl------


1) Out put of test.pl
      executing shell
      BEFORE BTEQ
      After BTEQ

2) Out put of test_1.pl
      executing shell
      BEFORE BTEQ

---------------------
second one will not printing anything after BTEQ...

what could be the reasons ?

Thanks
-Madhu


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

#17913 From: "wadunn83" <wadunn83@...>
Date: Tue Feb 3, 2004 10:15 pm
Subject: Mac OS X terminal question
wadunn83
Send Email Send Email
 
First: thanks again for all the help in picking a book.

Now: I bought Tisdall's Beg Perl for Bioinformatics.  I am trying to
type and run a SIMPLE example in my Mac OS 10.2.x Unix terminal and I
am completely failing.  Can a fellow Mac Perl-er help me out with the
logistics of where to write the code, where to save it, and how to
tell my computer to run it.  I KNOW THIS IS BELOW you all, but I am
about to shatter my poor computer screen.  I am getting the coding
ideas I just cant figure out the system.  Thank you all for your
patience.  Also, can a Mac person suggest a good free text editor to
use in writing the code.


-Augustine

FYI the code is:

#!/usr/bin/perl -w
$DNA = 'AACGGTATGACTGAACGCGGTAGC';

PRINT DNA;

EXIT;

#17914 From: "Maria K Meyers" <mmeyer4@...>
Date: Tue Feb 3, 2004 10:26 pm
Subject: Re: [PBML] Diff b/w using "system" command and using ` `(back quotes) in perl
compbrat75
Send Email Send Email
 
This may or may not be it - but I only use the ` command`  when assigning
the output of that command to a scalar or array.
What does your error log say?
~Maria




--------test_1.pl-----------
print "executing shell \n";

`t1.ksh`;

print "t1.ksh completed";

#17915 From: John S Brigham <mrphysh@...>
Date: Tue Feb 3, 2004 11:32 pm
Subject: Re: [PBML] Mac OS X terminal question
mrphysh@...
Send Email Send Email
 
I am just a little ahead of you and may be helpful.
--The CPAN installs the Perl in some mysterious way according to
specifications that probably few people understand, certainly not me.
But it does not matter, don't worry.
--write the Perl script and save it in a directory.
--in DOS, navigate to the directory with the script.  You do not care
where the Perl stuff is.  On my computer, the Perl is on the other hard
drive.
--type perl -c nameofscript.pl       this will check the syntax     The
computer will find the Perl machinery.
--then type  perl -w nameofscript.pl    this will run the script.  .

I love my Crimson Editor for Perl.
I realize you have a Mac, but it cannot be that different.
My advise: be persistant.
John in Denver



On Tue, 03 Feb 2004 22:15:16 -0000 "wadunn83" <wadunn83@...> writes:
> First: thanks again for all the help in picking a book.
>
> Now: I bought Tisdall's Beg Perl for Bioinformatics.  I am trying
> to
> type and run a SIMPLE example in my Mac OS 10.2.x Unix terminal and
> I
> am completely failing.  Can a fellow Mac Perl-er help me out with
> the
> logistics of where to write the code, where to save it, and how to
> tell my computer to run it.  I KNOW THIS IS BELOW you all, but I am
> about to shatter my poor computer screen.  I am getting the coding
> ideas I just cant figure out the system.  Thank you all for your
> patience.  Also, can a Mac person suggest a good free text editor
> to
> use in writing the code.
>
>
> -Augustine
>
> FYI the code is:
>
> #!/usr/bin/perl -w
> $DNA = 'AACGGTATGACTGAACGCGGTAGC';
>
> PRINT DNA;
>
> EXIT;
>
>
>
>
> Unsubscribing info is here:
> http://help.yahoo.com/help/us/groups/groups-32.html
>
> ------------------------ Yahoo! Groups Sponsor
>
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
>  http://groups.yahoo.com/group/perl-beginner/
>
> To unsubscribe from this group, send an email to:
>  perl-beginner-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to:
>  http://docs.yahoo.com/info/terms/
>
>
>
>

________________________________________________________________
The best thing to hit the Internet in years - Juno SpeedBand!
Surf the Web up to FIVE TIMES FASTER!
Only $14.95/ month - visit www.juno.com to sign up today!

#17916 From: "Jeff Eggen" <jeggen@...>
Date: Tue Feb 3, 2004 11:02 pm
Subject: Re: [PBML] Mac OS X terminal question
jeggen@...
Send Email Send Email
 
>>> wadunn83@... 02/03/04 04:15pm >>>
>Now: I bought Tisdall's Beg Perl for Bioinformatics.  I am trying to
>type and run a SIMPLE example in my Mac OS 10.2.x Unix terminal and I
>am completely failing.  Can a fellow Mac Perl-er help me out with the
>logistics of where to write the code, where to save it, and how to
>tell my computer to run it.  I KNOW THIS IS BELOW you all, but I am
>about to shatter my poor computer screen.  I am getting the coding
>ideas I just cant figure out the system.  Thank you all for your
>patience.  Also, can a Mac person suggest a good free text editor to
>use in writing the code.

Doesn't Mac OSX come with vi?  What could be better?

Ooh, I'm gonna take heat for that one.

Seriously, though, if there is a Notepad-like editor that lets you save simple
text files, you can just use that to code.  Or, a search on google for editors
would probably turn up something.

>-Augustine

>FYI the code is:

>#!/usr/bin/perl -w
>$DNA = 'AACGGTATGACTGAACGCGGTAGC';

>PRINT DNA;

>EXIT;

Is your code actually this case?  In caps, I mean.  If so, it won't run. Try
this:

#!/usr/bin/perl -w

use strict; # Very necessary for a newbie!!

my $DNA = 'AACGGTATGACTGAACGCGGTAGC';

print $DNA, "\n"; # You need the dollar sign
exit;

I'm unfamiliar with Mac OSX workings, but if you have some kind of command shell
that is anything like unix, just try to run the script via the following
commands:

First, make it executable:
chmod u+x yourscript.pl

Then, run it:
./yourscript.pl

If it isn't, then you can ignore that bit.

If you are attempting to run your script and getting errors, post the errors so
we know where to help you.

Hope this helps,

Jeff Eggen
IT Programmer Analyst
Saskatchewan Government Insurance
Ph (306) 751-1795
email jeggen@...

#17917 From: franki <franki@...>
Date: Tue Feb 3, 2004 11:12 pm
Subject: Re: [PBML] Mac OS X terminal question
frankhauptle
Send Email Send Email
 
A mac using friend of mine swears by pagespinner..
http://www.optima-system.com/pagespinner/

but OSX is based on freeBSD so anything that works on that can usually
be made to work on OSX and most have packages already made for you..
(google is your friend.)

hmmm, unix type text editors... the list is very long, I spose the most
well known would be vi and emacs.. but there are about 3 dozen others..

Unix users are very loyal to their text editors, so when you choose one,
be careful who you tell about your choice :-)

regards

Franki


Jeff Eggen wrote:

>>>>wadunn83@... 02/03/04 04:15pm >>>
>>
>>Now: I bought Tisdall's Beg Perl for Bioinformatics.  I am trying to
>>type and run a SIMPLE example in my Mac OS 10.2.x Unix terminal and I
>>am completely failing.  Can a fellow Mac Perl-er help me out with the
>>logistics of where to write the code, where to save it, and how to
>>tell my computer to run it.  I KNOW THIS IS BELOW you all, but I am
>>about to shatter my poor computer screen.  I am getting the coding
>>ideas I just cant figure out the system.  Thank you all for your
>>patience.  Also, can a Mac person suggest a good free text editor to
>>use in writing the code.
>
>

#17918 From: "fd97616" <fd97616@...>
Date: Wed Feb 4, 2004 1:22 am
Subject: I cannot understand this output....pls explain.
fd97616
Send Email Send Email
 
$a = "Hello";

$b = "world";

if ($a == $b){
	 print "Fine\n";
}


this is the code....
here the Fine is getting printed....

so actaully means that $a is equal to $b...
how is that possible.....
I cannot understand this.

can someone please explain this to me.
thanks.
kaushik.

#17919 From: "Fernando Luna" <Fernando.Luna@...>
Date: Wed Feb 4, 2004 1:32 am
Subject: RE: [PBML] I cannot understand this output....pls explain.
Fernando.Luna@...
Send Email Send Email
 
Because "==" is for numeric comparisons

Use "eq"...

As in

If ($a eq $b) {



-----Original Message-----
From: fd97616 [mailto:fd97616@...]
Sent: Tuesday, February 03, 2004 5:23 PM
To: perl-beginner@yahoogroups.com
Subject: [PBML] I cannot understand this output....pls explain.


$a = "Hello";

$b = "world";

if ($a == $b){
	 print "Fine\n";
}


this is the code....
here the Fine is getting printed....

so actaully means that $a is equal to $b...
how is that possible.....
I cannot understand this.

can someone please explain this to me.
thanks.
kaushik.




Unsubscribing info is here:
http://help.yahoo.com/help/us/groups/groups-32.html

Yahoo! Groups Links

To visit your group on the web, go to:
http://groups.yahoo.com/group/perl-beginner/

To unsubscribe from this group, send an email to:
perl-beginner-unsubscribe@yahoogroups.com

Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/

#17920 From: Electron One <electron1@...>
Date: Wed Feb 4, 2004 2:30 am
Subject: Look ahead in a file?
thejoeshmoe
Send Email Send Email
 
Is there a way to look ahead in a file?

For example, I am writing a perl script that changes one type of format to
another, and it grabs a file line by line. If it see's an "If", it knows
that its an IF statement. So it wants to replace this type of "IF" statement,

IF certain condition
(

)

to this type,

IF (certain condition)
{

}

So the perl script has to be able to look forward in the file, temporarily,
to replace the first occurrence of "(" and (maybe many lines later) the
first occurance of ")", than return to where its at, and process that line....

how would I do that?

#17921 From: Jeff 'japhy' Pinyan <japhy@...>
Date: Wed Feb 4, 2004 5:35 am
Subject: Re: [PBML] I cannot understand this output....pls explain.
evilffej
Send Email Send Email
 
On Feb 4, fd97616 said:

>$a = "Hello";
>$b = "world";
>
>if ($a == $b){
> print "Fine\n";
>}

You are not using warnings.  Your code should always have

   use warnings;

in it if you're using Perl 5.6 or later.  If you're still using Perl
5.005, then your #! line should look like

   #!/usr/bin/perl -w

>so actaully means that $a is equal to $b...

You would know why if you had warnings on.  The == operator is for NUMERIC
equality.  To compare strings, use 'eq'.

Read 'perldoc perlop' for the full list of numeric and stringic comparison
operators.

--
Jeff "japhy" Pinyan      japhy@...      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]

#17922 From: Jeff 'japhy' Pinyan <japhy@...>
Date: Wed Feb 4, 2004 5:36 am
Subject: Re: [PBML] Look ahead in a file?
evilffej
Send Email Send Email
 
On Feb 3, Electron One said:

>Is there a way to look ahead in a file?

Well, you can store your current location

   $here_i_am = tell FILE;

do some stuff

   while (<FILE>) { ... }

and then restore your position:

   seek FILE, $here_i_am, 0;

I suggest reading 'perldoc -f seek' and 'perldoc -f tell' for more.

--
Jeff "japhy" Pinyan      japhy@...      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]

#17923 From: "rrreddy0211" <rrreddy0211@...>
Date: Wed Feb 4, 2004 9:06 am
Subject: Re: I cannot understand this output....pls explain.
rrreddy0211
Send Email Send Email
 
Hi,

== is a numeric comparsion operator, so it assumes variables to be in
numeric form. Since here variable values are non-numeric, they are
treated as zeros and hence the result will be true and 'fine'
statement is printed out.

Hope this is clear.

- Reddy.

--- In perl-beginner@yahoogroups.com, "fd97616" <fd97616@y...> wrote:
> $a = "Hello";
>
> $b = "world";
>
> if ($a == $b){
>  print "Fine\n";
> }
>
>
> this is the code....
> here the Fine is getting printed....
>
> so actaully means that $a is equal to $b...
> how is that possible.....
> I cannot understand this.
>
> can someone please explain this to me.
> thanks.
> kaushik.

#17924 From: daymobrew@...
Date: Wed Feb 4, 2004 9:27 am
Subject: Re: [PBML] Look ahead in a file?
daymobrew
Send Email Send Email
 
--- In perl-beginner@yahoogroups.com, Jeff 'japhy' Pinyan <japhy@p...>
wrote:
> On Feb 3, Electron One said:
>
> >Is there a way to look ahead in a file?
>
> Well, you can store your current location
>
>   $here_i_am = tell FILE;
>
> do some stuff
>
>   while (<FILE>) { ... }
>
> and then restore your position:
>
>   seek FILE, $here_i_am, 0;
>
> I suggest reading 'perldoc -f seek' and 'perldoc -f tell' for more.
>
> --
> Jeff "japhy" Pinyan      japhy@p...      http://www.pobox.com/~japhy/
> RPI Acacia brother #734   http://www.perlmonks.org/
http://www.cpan.org/
> <stu> what does y/// stand for?  <tenderpuss> why, yansliterate of
course.
> [  I'm looking for programming work.  If you like my work, let me
know.  ]

Another option could be to read the entire file into memory, if it's
not too big.

open( FH, "filename.ext" );  # Omit 'die' for readability.
my @Wholefile = <FH>;
close( FH );

Now each line is in a different entry of @Wholefile i.e. $Wholefile[0]
is the first line of the file and $Wholefile[$#Wholefile] is the last
line.
This makes it easy to look ahead.
You can make changes to @Wholefile and then write it back to disk when
you are finished.

#17925 From: "mandwahlin" <mandwahlin@...>
Date: Wed Feb 4, 2004 3:34 pm
Subject: Renaming directories
mandwahlin
Send Email Send Email
 
Is it possible to rename a directory. I'm using mkdir to make a
directory but id like to rename it.

Cheers
Mand

#17926 From: Peter Dominey <pdominey@...>
Date: Wed Feb 4, 2004 3:43 pm
Subject: Re: [PBML] Mac OS X terminal question
pdominey
Send Email Send Email
 
--- Jeff Eggen <jeggen@...> wrote:
> >>> wadunn83@... 02/03/04 04:15pm >>>
> >Now: I bought Tisdall's Beg Perl for
> Bioinformatics.  I am trying to
> >type and run a SIMPLE example in my Mac OS 10.2.x
> Unix terminal and I
> >am completely failing.  Can a fellow Mac Perl-er
> help me out with the
> >logistics of where to write the code, where to save
> it, and how to
> >tell my computer to run it.  I KNOW THIS IS BELOW
> you all, but I am
> >about to shatter my poor computer screen.  I am
> getting the coding
> >ideas I just cant figure out the system.  Thank you
> all for your
> >patience.  Also, can a Mac person suggest a good
> free text editor to
> >use in writing the code.
>
> Doesn't Mac OSX come with vi?  What could be better?
>
> Ooh, I'm gonna take heat for that one.
>
> Seriously, though, if there is a Notepad-like editor
> that lets you save simple text files, you can just
> use that to code.  Or, a search on google for
> editors would probably turn up something.
>
> >-Augustine
>
> >FYI the code is:
>
> >#!/usr/bin/perl -w
> >$DNA = 'AACGGTATGACTGAACGCGGTAGC';
>
> >PRINT DNA;
>
> >EXIT;
>
> Is your code actually this case?  In caps, I mean.
> If so, it won't run. Try this:
>
> #!/usr/bin/perl -w
>
> use strict; # Very necessary for a newbie!!
>
> my $DNA = 'AACGGTATGACTGAACGCGGTAGC';
>
> print $DNA, "\n"; # You need the dollar sign
> exit;
>
> I'm unfamiliar with Mac OSX workings, but if you
> have some kind of command shell that is anything
> like unix, just try to run the script via the
> following commands:
>
> First, make it executable:
> chmod u+x yourscript.pl
>
> Then, run it:
> ./yourscript.pl
>
> If it isn't, then you can ignore that bit.
>
> If you are attempting to run your script and getting
> errors, post the errors so we know where to help
> you.
>

Jeff,

Wonderfully MAC OS X is really UNIX. So from a
terminal you can follow pretty much all the rules and
instructions for using and working with PERL on UNIX.

The vi editor is available on OS X and I find it as
quick and easy to use as anything else. Certainly
while in a terminal it's so much quicker than opening
up seperate apps.

The first rule to follow ism know where perl is
instaalled, do the command 'which perl' to tell you
where it is located it'll be something like
/usr/bin/perl or maybe /usr/local/bin/perl. This is
what you need at the top of your script following the
#!

Next, for ease of use make sure your currect directory
is in you PATH. so enter the command PATH=$PATH:.
This will append the 'current' directory to you path
and therefore 'find' any executable (script etc)) in
your current dir (after searching the previous
directories defined in the PATH variable). It's worth
noting however that the command above is only valid
for the time you have that particula terminal session
open. For it to be configured for everytime you open a
terminal you'll need to change one or two other file.
But that a whole different topic.

Hope this is of assitance.

Thanks
Peter


=====
**********************************************************
P J Dominey
Independent UNIX Contractor

E-Mail:     pdominey@...
Web Site:     www.dominey.biz
Tel:         972-424-5705                  Yahoo IM:    pdominey
**********************************************************

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

#17927 From: merlyn@...
Date: Wed Feb 4, 2004 3:58 pm
Subject: Re: [PBML] Renaming directories
merlynstoneh...
Send Email Send Email
 
>>>>> "mandwahlin" == mandwahlin  <mandwahlin@...> writes:

mandwahlin> Is it possible to rename a directory. I'm using mkdir to make a
mandwahlin> directory but id like to rename it.

rename() works on directories, provided you aren't crossing filesystem
boundaries.

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@...> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

#17928 From: "List Account" <list.account@...>
Date: Wed Feb 4, 2004 4:01 pm
Subject: RE: [PBML] Renaming directories
list.account@...
Send Email Send Email
 
http://www.computerhope.com/renamehl.htm#03

Example:
Rename the directory chope to hope.

rename c:\chope hope

-Nathan

-----Original Message-----
From: mandwahlin [mailto:mandwahlin@...]
Sent: Wednesday, February 04, 2004 10:34 AM
To: perl-beginner@yahoogroups.com
Subject: [PBML] Renaming directories


Is it possible to rename a directory. I'm using mkdir to make a
directory but id like to rename it.

Cheers
Mand


Unsubscribing info is here:
http://help.yahoo.com/help/us/groups/groups-32.html

------------------------ Yahoo! Groups Sponsor
---------------------~--> Buy Ink Cartridges or Refill Kits for
your HP, Epson, Canon or Lexmark Printer at MyInks.com. Free s/h
on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/ndFolB/TM
-----------------------------------------------------------------
----~->

Yahoo! Groups Links

To visit your group on the web, go to:
http://groups.yahoo.com/group/perl-beginner/

To unsubscribe from this group, send an email to:
perl-beginner-unsubscribe@yahoogroups.com

Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/

#17929 From: A M <gr3ypilgrim@...>
Date: Wed Feb 4, 2004 4:56 pm
Subject: New member!
gr3ypilgrim
Send Email Send Email
 
Hi folks,

I've just started learning Perl. Could you please
recommend some books for me. I have some programming
experince in C. I already have "Learning Perl, 3rd
edition".

Thanks.
GreyPilgrim

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

#17930 From: "Maria K Meyers" <mmeyer4@...>
Date: Wed Feb 4, 2004 5:00 pm
Subject: Re: [PBML] Mac OS X terminal question
compbrat75
Send Email Send Email
 
>Doesn't Mac OSX come with vi?  What could be better?

>Ooh, I'm gonna take heat for that one.

Nothing is better than vi.
Vi is the best editor in the world.
I am a loyal unix user.
I love vi.
Ah, vi.
Vi.

~Maria

#17931 From: Brad Lhotsky <brad@...>
Date: Wed Feb 4, 2004 5:23 pm
Subject: Re: [PBML] New member!
brad@...
Send Email Send Email
 
Have you seen: http://books.perl.org  ??

This may help:

Beginners: http://books.perl.org/category/7
Categories: http://books.perl.org/categories

I own: "Programming Perl", "Perl Cookbook", "Advanced Perl
Programing", "Object Oriented Perl", "Mastering Regular Expressions",
"Programming the Perl DBI", "Perl in a Nutshell", "Learning Perl
Objects, References, and Modules", and "Network Programming with Perl".

All of which I reference frequently.


On Wed, Feb 04, 2004 at 08:56:04AM -0800, A M wrote:
> Hi folks,
>
> I've just started learning Perl. Could you please
> recommend some books for me. I have some programming
> experince in C. I already have "Learning Perl, 3rd
> edition".
>
> Thanks.
> GreyPilgrim
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free web site building tool. Try it!
> http://webhosting.yahoo.com/ps/sb/
>
> Unsubscribing info is here:
http://help.yahoo.com/help/us/groups/groups-32.html
>
>
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
>  http://groups.yahoo.com/group/perl-beginner/
>
> To unsubscribe from this group, send an email to:
>  perl-beginner-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to:
>  http://docs.yahoo.com/info/terms/
>
>

--
Brad Lhotsky <brad@...>

#17932 From: "painter_man" <LStern@...>
Date: Wed Feb 4, 2004 5:07 pm
Subject: Re: [PBML] Mac OS X terminal question
painter_man
Send Email Send Email
 
--- In perl-beginner@yahoogroups.com, "Maria K Meyers" <mmeyer4@h...>
wrote:
>
> >Doesn't Mac OSX come with vi?  What could be better?
>
> >Ooh, I'm gonna take heat for that one.
>
> Nothing is better than vi.
> Vi is the best editor in the world.
> I am a loyal unix user.
> I love vi.
> Ah, vi.
> Vi.
>
> ~Maria

Vi is an emacs macro to hide the power of a real editor from those
who are not yet ready for it.
<grins and returns to temple to wait for another novice>
LOL

Messages 17903 - 17932 of 27465   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help