You can just do this if you want it to be in one line:

```perl
return if $data eq "";
```