Thread View: pl.comp.lang.perl
3 messages
3 total messages
Started by Scottie
Sun, 17 Jul 2011 09:14
Pytanie o znaczenie "0xffff & system"
Author: Scottie
Date: Sun, 17 Jul 2011 09:14
Date: Sun, 17 Jul 2011 09:14
22 lines
1829 bytes
1829 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 09:59
Date: Sun, 17 Jul 2011 09:59
29 lines
1718 bytes
1718 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 Gryszkalis
Date: Sun, 17 Jul 2011 21:54
Date: Sun, 17 Jul 2011 21:54
11 lines
1128 bytes
1128 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