Thread (Message) | Date | Author |
Score |
Board |
suchen und vergleichen
(#32710) |
2005-01-10 23:23 |
Strat
|
 |
Datenbanken und Verzeichnisdienste |
… stattfindet; vielleicht das CGI->new aus dem Block und der subroutine herausziehen und somit nur einmal ausfuehren...
2.
[code]
my $statement_select="SELECT docname FROM tbl0011990 where… |
|
suchen und vergleichen
(#32716) |
2005-01-12 18:53 |
Strat
|
 |
Datenbanken und Verzeichnisdienste |
… so C-aehnlich aus
2. verwendet variablen, die ausserhalb der subroutine deklariert wurden und nicht als parameter uebergeben wurden
[code]
while (my @row = $sth_suchen->fetchrow_array())
{… |
|
TK während der laufzeiit JPGs anzeigen
(#104971) |
2008-01-21 00:49 |
styx-cc
|
 |
Graphische Oberflächen |
… => 'Tests with Images');
main_gui($mw);
MainLoop;
### Subroutines ###
sub main_gui {
$mw = shift;
my $frame_left = $mw->Frame(-background => 'red', -width => 130, -height => 500)… |
|
$sth->finish(); zwingend erforderlich
(#126938) |
2009-10-13 19:20 |
pq
|
 |
Allgemeines zu Perl |
… wenn du den hauptteil deines skriptes in ein modul auslagerst und nur den aufruf im skript selbst hast, da ModPerl::Registry dein skript wiederum in ein modul mit einer subroutine verschachtelt. |
|
.txt und Arrays
(#112364) |
2008-07-21 10:58 |
MatthiasW
|
 |
Allgemeines zu Perl |
Und derjenige, der die Subroutinen verwendet, wird darauf hingewiesen, falls er einen Fehler gemacht hat.
D.h. natürlich nicht, dass man sich das Prüfen der Parameter sparen kann, wenn man… |
|
Auswertung des Ergebnisses einer Variable
(#112420) |
2008-07-22 02:48 |
defun
|
 |
Allgemeines zu Perl |
… der Ausführung hinauszögern? Dann verwende am besten eine anonyme Subroutine:
[perl]my $variable = sub {$number =~ m/(9*0*)/};
# ...
if ($variable->()){
# ... |
|
Lookup Tabelle - Kein Rückgabewert
(#111025) |
2008-06-14 02:54 |
murphy
|
 |
Allgemeines zu Perl |
…
für den Fall, dass Du meinen Rat annimmst, lieber anonyme Subroutinen zu speichern, die die Ausgabedaten nach Bedarf berechnen, statt immer alle Typen von Ausgabedaten direkt in dem assoziativen… |
|
Rückgabewert in Variable speichern???
(#667) |
2004-01-19 20:27 |
format_c
|
 |
Perl/CGI |
Wenn du allerdings deinen Code ausschließlich in Subroutinen steckst sieht das eingebundene script etwa so aus.
[code]
use strict;
sub schagmichtot ($) {return 1 if $_[0] eq 'ok';}
1;# Damit unser… |
|
Frage: Perl und GDBM unter Linux
(#593) |
2003-12-25 20:42 |
Tobi
|
 |
Perl/CGI |
… in Zeile 15
[code]
[Thu Dec 25 19:34:53 2003] [error] Undefined subroutine &Apache::ROOTtobias::lounge::cgi_2dbin::pc_anmelden_2epl::ReadParse called at… |
|
Ideen zur LDAP user authentication
(#153585) |
2011-11-15 14:20 |
arieger
|
 |
Allgemeines zu Perl |
my $userdn = testGuid ("$myGUID", "$password");
wird über eine andere subroutine gefüllt. das klappt auch soweit
habt ihr eine Idee
mittlerweile konnte ich selber lösen. |
|
XML-Parser beenden?
(#112261) |
2008-07-17 18:27 |
guest Gast
|
 |
Fragen zu Perl-Modulen |
…
$pParser -> parsefile($Files[$j]);
}
}
}[/code]
Subroutine:
[code]
sub anfang{
my($p, $starttag, %attr) = @_;
# beginnt eine neue Datei?
if($starttag eq "testsuite") {
#… |
|
PAR kompilierte kopirte file geht nicht mehr
(#47517) |
2005-11-09 22:22 |
mandawar
|
 |
Installation und Konfiguration |
… Goto undefined subroutine &DynaLoader::bootstrap_inherit at /loader/0x9a0b28/XSL
oader.pm line 101. |
|
private/public subs in modules
(#117172) |
2008-12-13 17:17 |
LanX-
|
 |
Allgemeines zu Perl |
# First, store an anonymous subroutine in a file-scoped lexical:
# declare private method
my $secret_door = sub {
my $self = shift;
... |
|
Objektorientierung vs. Prozedural
(#77214) |
2007-06-03 21:23 |
bloonix
|
 |
Allgemeines zu Perl |
ein framework wächst ja von
natur aus, und ich habe schon so oft subroutinen umgestellt von
der übergabe a la "[tt]func($foo, $bar, \@baz)[/tt] auf
"[tt]func({foo => $foo, bar => $bar, baz =>… |
|
Variablen in reg. Ausdrücken (s#$from#$to#g)
(#68174) |
2006-07-17 22:29 |
renee
|
 |
Allgemeines zu Perl |
… of the current Perl program, so that any
variable settings or subroutine and format definitions remain
afterwards. Note that the value is parsed every time the "eval"
executes. |
|
XS Nachhilfe ...
(#59134) |
2005-10-22 16:02 |
J-jayz-Z
|
 |
Allgemeines zu Perl |
… ':all';
&curse::taste();
[/code]
bekomme ich nur:
Undefined subroutine &curse::taste called at test.pl line 7.
Kann mir jemand sagen, wie ich die *.h Datei in die *.xs Datei umwandeln kann … |
|
substr_count in perl
(#84312) |
2004-07-15 19:48 |
betterworld
|
 |
Allgemeines zu Perl |
… der Tat um eine Liste und nicht um den Komma-Operator, denn eine Subroutine gibt immer eine Liste zurueck.
So, nun haben wir das wohl genug durchgekaut. |
|
welche module könnt ihr mir empfehlen: pm-webbaukasten aufrüsten
(#28541) |
2006-05-19 12:08 |
pq
|
 |
Webframeworks, Sonstige Fragen zur Webprogrammierung mit Perl |
… [i]wie groß ist mein hash?[/i]
[cpan=Benchmark]Benchmark[/cpan] - [i]wie langsam ist meine subroutine?[/i]
@strat: danke für die häufige positive erwähnung von HTC =)\n\n
<!--EDIT|pq|1148027134--> |
|
grep <br> in text
(#128393) |
2009-11-21 15:42 |
pq
|
 |
Perl/CGI |
wow. wo hast du die subroutine splitVars her? das ist noch steinzeitlicher als die steinzeitlichste CGI-verarbeitung, die ich bisher gesehen habe. |
|
Programmierparadigmen in Perl
(#171610) |
2013-10-28 16:40 |
murphy
|
 |
Allgemeines zu Perl |
… als Werte wie jedes andere Datenobjekt, es gibt anonyme Subroutinen, die lexikalische Closures bilden, und es gibt grundlegende Funktionen höherer Ordnung wie [c]map[/c], [c]grep[/c] in der… |