Thread View: pl.comp.lang.perl
3 messages
3 total messages
Started by Scottie
Sun, 17 Jul 2011 02:14
Pytanie o znaczenie "0xffff & system"
Author: Scottie
Date: Sun, 17 Jul 2011 02:14
Date: Sun, 17 Jul 2011 02:14
23 lines
587 bytes
587 bytes
Hej! W jednym skrypcie znalazlem takie oto wywolanie: ----------------8<---------------- if ($file_only ne "true") { $rc = 0xffff & system("${ORACLE_HOME}/bin/sqlplus -silent $rep_user/$rep_pwd@\"$rep_alias\" \@$outfile"); $rc >>= 8; return $rc; } ----------------8<---------------- Czy ktos moglby mnie oswiecic, co oznacza zwlaszcza to wyrazenie: "0xffff & system"? Co tu robi i do czego sluzy ten kod szesnastkowy? Nastepna linia tez jest ciekawa: "$rc >>= 8;", ale tez nie rozumiem jej znaczenia... :-/ Z gory wielkie dzieki! Pzdr, -- Scottie
Re: Pytanie o znaczenie "0xffff & system"
Author: Marcin Kalinski
Date: Sun, 17 Jul 2011 11:59
Date: Sun, 17 Jul 2011 11:59
30 lines
733 bytes
733 bytes
W dniu 17.07.2011 11:14, Scottie pisze: > Hej! > W jednym skrypcie znalazlem takie oto wywolanie: > ----------------8<---------------- > if ($file_only ne "true") > { > $rc = 0xffff& system("${ORACLE_HOME}/bin/sqlplus -silent > $rep_user/$rep_pwd@\"$rep_alias\" \@$outfile"); > $rc>>= 8; > return $rc; > } > ----------------8<---------------- > > Czy ktos moglby mnie oswiecic, co oznacza zwlaszcza to wyrazenie: > "0xffff& system"? Co tu robi i do czego sluzy ten kod szesnastkowy? > Nastepna linia tez jest ciekawa: "$rc>>= 8;", ale tez nie rozumiem > jej znaczenia... :-/ > > Z gory wielkie dzieki! > > Pzdr, > -- > Scottie poczytaj o operatorach binarnych -- Marcin 'bcn' Kalinski
Re: Pytanie o znaczenie "0xffff & system"
Author: Marcin Gryszkali
Date: Sun, 17 Jul 2011 23:54
Date: Sun, 17 Jul 2011 23:54
13 lines
267 bytes
267 bytes
Marcin Kalinski wrote: >> $rc = 0xffff& system("${ORACLE_HOME}/bin/sqlplus -silent > poczytaj o operatorach binarnych no i o tym co zwraca system() :) pozdrawiam -- Marcin Gryszkalis, PGP 0x9F183FA3 jabber jid:mg@fork.pl, gg:2532994 http://the.fork.pl
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads