준호씨의 블로그
@my_array = (); undef @my_array; $#my_array = -1; splice(@my_array); 참고 How do I completely empty out an array? Perl Clear Array
exit value 구하는 방법 system 함수를 실행하면 결과 정보가 $? 에 담겨진다. 8bit 를 버리고 나면 $? >> 8; 예제 exit5.pl 코드를 작성하고 5 로 종료 하는 코드를 작성한다. exit 5; testexit.pl 코드를 작성한다. system("perl", "exit5.pl"); printf "%d\n", $? >> 8; 코드를 실행해 보면 exit 5 로 넘겨 받은 값이 출력되는 것을 볼 수 있다. $ perl testexit.pl 5 perldoc 의 system 에 있는 예제를 참고 하도록 한다. if ($? == -1) { print "failed to execute: $!\n"; } elsif ($? & 127) { printf "child died with sig..
파일 하나 삭제 unlink $file; 리스트의 파일 삭제 unlink @files; 조건에 해당 하는 파일 삭제. *.bak 삭제 방법 unlink glob "*.bak"; 참고 unlink - perldoc 펄에서 파일 이동/복사/이름변경 방법 glob - perldoc
use Net::Address::IP::Local; my $ip = Net::Address::IP::Local->public; print $ip; $ perl ip.pl 14.47.186.209 참고 http://search.cpan.org/~jmehnle/Net-Address-IP-Local-0.1.2/lib/Net/Address/IP/Local.pm
var params = { width:1680, height:1050 }; var str = jQuery.param( params ); 결과 width=1680&height=1050 참고 jQuery.param()
sudo service ssh restart /etc/init.d/sshd restart
gmail 검색창에서 size:5000000 과 같이 검색 하면 메일 사이즈가 대략 5MB 이상인 메일들이 검색된다. size:10000000 로 검색하면 대략 10MB 이상인 메일들이 검색된다고 보면 된다. 참고 Find the Large Attachments Eating Up Your Gmail Space with a Simple Search 2011.08.12
Keycastr will let you visualize what key you stroked. Like this Configuration window Installation $ brew cask install keycastr References Keycastr github
git 에서는 기본적으로 대소문자 변경해도 같은 파일로 인식한다. podfile 을 Podfile 로 바꾸고 싶어서 mv podfile Podfile 해도 바뀐 파일로 인식 하지 않는다. 이럴 때는 force 옵션으로 강제 변환이 가능하다. git mv --force podfile Podfile
dotnet sdk 설치 brew cask install dotnet-sdk https://www.microsoft.com/net/learn/get-started/macos 에서 "Download .NET SDK" 로 다운 받아서 설치 해도 된다. app 만들기 $ dotnet new console -o myApp $ cd myApp 다음과 같은 파일들이 생성된 것을 볼 수 있다. $ tree . ├── Program.cs ├── myApp.csproj └── obj ├── myApp.csproj.nuget.cache ├── myApp.csproj.nuget.g.props ├── myApp.csproj.nuget.g.targets └── project.assets.json 1 directory, 6 fi..