Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Perlscript und -?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Astrid  
View profile   Translate to Translated (View Original)
 More options Nov 6 2012, 3:51 am
Newsgroups: de.comp.lang.perl.misc
From: Astrid <astrid.k...@googlemail.com>
Date: Tue, 6 Nov 2012 00:51:19 -0800 (PST)
Local: Tues, Nov 6 2012 3:51 am
Subject: Perlscript und -?
Hallo zusammen,

habe ein kleines Perlscript, dem man ein paar Parameter mit auf den
Weg geben kann.
Nun moechte ich, dass wenn man
script.pl -?
eingibt, ein kleiner Hilfetext kommt.

Muss man das komplett selber programmieren, oder reicht es, den
Hilfetext mit einer
bestimmten Syntax im Script einzubauen und das Script macht es dann
"alleine"?

Gruss, Astrid


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ReneeB  
View profile  
 More options Nov 6 2012, 5:05 am
Newsgroups: de.comp.lang.perl.misc
From: ReneeB <mod...@renee-baecker.de>
Date: Tue, 6 Nov 2012 02:05:40 -0800 (PST)
Local: Tues, Nov 6 2012 5:05 am
Subject: Re: Perlscript und -?
Beispiel:

#!/usr/bin/perl

use strict;
use warnings;

use Getopt::Std;
use Data::Dumper;

our %opts;
getopts( '?' => \%opts );

print Dumper \%opts;

if ( $opts{'?'} ) {
    print "Hilfe: $0\n";
    exit;

}

print 'done...';

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Astrid  
View profile   Translate to Translated (View Original)
 More options Nov 15 2012, 6:52 am
Newsgroups: de.comp.lang.perl.misc
From: Astrid <astrid.k...@googlemail.com>
Date: Thu, 15 Nov 2012 03:52:42 -0800 (PST)
Local: Thurs, Nov 15 2012 6:52 am
Subject: Re: Perlscript und -?
Besten Dank.

Verstehe nicht, was der Dumper da macht?

Gruss, Astrid


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ReneeB  
View profile   Translate to Translated (View Original)
 More options Nov 15 2012, 8:36 am
Newsgroups: de.comp.lang.perl.misc
From: ReneeB <mod...@renee-baecker.de>
Date: Thu, 15 Nov 2012 05:36:39 -0800 (PST)
Local: Thurs, Nov 15 2012 8:36 am
Subject: Re: Perlscript und -?
Am Donnerstag, 15. November 2012 12:52:42 UTC+1 schrieb Astrid:

> Besten Dank.

> Verstehe nicht, was der Dumper da macht?

> Gruss, Astrid

Der ist einfach nur für die Debugging-Ausgabe da - um zu zeigen was in %opts steckt.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »