Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Fehlerbehandlung in Perl

Empfohlene Antworten

Veröffentlicht

Hi mal ne kurze frage zum Perl:

wenn ich z.B. folgendes mache

$ftp=Net::FTP->new($ftpsrv, Debug=>0) || die "Keine Verbindung mit $server.\n";

oder

$messagenum = $pop3->login($user,$passwd) || die "Konnte nicht in $pop3Server einloggen";

steigt mir das programm ganz aus

ich würde es aber bevorzugen das das programm weiterläuft aber bei einen fehler z.B: in $error = 1 ausführt.

aber wichtig ist das bei einem fehler das programm sich nicht beendet. kann mir jemand verraten wie das fuzt ?

Danke

Naja, die heißt nunmal töten. Benutze anstelle von die den Befehl warn und es wird nur eine Warung ausgeben. Kombiniert mit einem weiteren Befehl könnte das dann so aussehen:

gehtschief() or $error = 1, warn "Ooops\n";

Mit , kann man Befehle zusammenfassen.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.